ryoga
驱动小牛
驱动小牛
  • 注册日期2005-01-13
  • 最后登录2006-09-22
  • 粉丝0
  • 关注0
  • 积分824分
  • 威望84点
  • 贡献值0点
  • 好评度81点
  • 原创分0分
  • 专家分0分
阅读:2856回复:2

关于OEMTextOut?

楼主#
更多 发布于:2005-04-13 08:39
请教一下,2K中在OEMTextOut里的那些参数里,有没有涉及到字体倾斜角度的成员变量?FONTOBJ_pifi返回的是一个IFIMetrics结构,这个结构里有没有可以计算倾斜角度的成员变量呢?看DDK看的是“一知1/4解”,郁闷ing...在98下是在TEXTXFORM结构中有一个lfescapement的成员刚好就是这个倾斜角度,而2K里不知道变成什么了,还有那个LOGFONT中也有一个lforiention成员变量也是这个,可是,如何把OEMTextout的某个参数转化成LOGFONT呢,是STROBJ吗?还是FONTOBJ? 望知道的大虾不吝赐教,将会高分相赠。谢谢了。
小生我没钱,小生我是穷人...挥剑问情...
worldcup
驱动小牛
驱动小牛
  • 注册日期2004-08-19
  • 最后登录2006-10-19
  • 粉丝0
  • 关注0
  • 积分7分
  • 威望2点
  • 贡献值0点
  • 好评度0点
  • 原创分0分
  • 专家分0分
沙发#
发布于:2005-04-13 08:54
请教楼主,你是在哪里看到OEMTextOut函数的,我真是第一次听说!
ryoga
驱动小牛
驱动小牛
  • 注册日期2005-01-13
  • 最后登录2006-09-22
  • 粉丝0
  • 关注0
  • 积分824分
  • 威望84点
  • 贡献值0点
  • 好评度81点
  • 原创分0分
  • 专家分0分
板凳#
发布于:2005-04-13 11:02
OEMTextOut
The OEMTextOut function calls for the driver to render a set of glyphs at specified positions.

BOOL APIENTRY
  OEMTextOut(
    SURFOBJ  *pso,
    STROBJ  *pstro,
    FONTOBJ  *pfo,
    CLIPOBJ  *pco,
    RECTL  *prclExtra,
    RECTL  *prclOpaque,
    BRUSHOBJ  *pboFore,
    BRUSHOBJ  *pboOpaque,
    POINTL  *pptlOrg,
    MIX  mix
    );
Headers
Declared in printoem.h. Include printoem.h.

Comments
See DrvTextOut.

Do not directly hook out this drawing function. Instead, implement OEMEnableDriver so that it fills in a DRVENABLEDATA structure listing all of the drawing DDIs to be hooked out.

If you call into the core driver, cast the call using the PFN_DrvTextOut function pointer.

这个是DDK中的说明,其实它就是DrvTextOut,解释如下,DDK中的
DrvTextOut
The DrvTextOut function is the entry point from GDI that calls for the driver to render a set of glyphs at specified positions.

BOOL
  DrvTextOut(
    IN SURFOBJ  *pso,
    IN STROBJ  *pstro,
    IN FONTOBJ  *pfo,
    IN CLIPOBJ  *pco,
    IN RECTL  *prclExtra,
    IN RECTL  *prclOpaque,
    IN BRUSHOBJ  *pboFore,
    IN BRUSHOBJ  *pboOpaque,
    IN POINTL  *pptlOrg,
    IN MIX  mix
    );
Parameters
pso
Pointer to a SURFOBJ structure that describes the surface on which to write.
pstro
Pointer to a STROBJ structure that defines the glyphs to be rendered and the positions in which to place them.
pfo
Pointer to a FONTOBJ structure from which to retrieve information about the font and its glyphs.
pco
Pointer to a CLIPOBJ structure that defines the clip region through which all rendering must be done. The driver cannot affect any pixels outside the clip region.
prclExtra
Pointer to a RECTL structure. GDI always sets this parameter to NULL in calls to this function. It should be ignored by the driver.
prclOpaque
Pointer to a RECTL structure that represents a single opaque rectangle. This rectangle is bottom-right exclusive. Pixels within this rectangle (those that are not foreground and not clipped) are to be rendered with the opaque brush. This rectangle always bounds the text to be drawn. If this parameter is NULL, no opaque pixels are to be rendered.
pboFore
Pointer to a BRUSHOBJ structure that represents the brush object to be used for the foreground pixels. This brush will always be a solid color brush.
pboOpaque
Pointer to a BRUSHOBJ structure that represents the opaque pixels. Both the foreground and background mix modes for this brush are assumed to be R2_COPYPEN. Unless the driver sets the GCAPS_ARBRUSHOPAQUE capabilities bit in the flGraphicsCaps member of the DEVINFO structure, it will always be called with a solid color brush.
pptlOrg
Pointer to a POINTL structure that defines the brush origin for both brushes.
mix
Specifies foreground and background raster operations (mix modes) for pboFore. The driver will only be called with both mix modes equal to COPYPEN unless it sets the GCAPS_ARBMIXTXT capabilities bit in the flGraphicsCaps member of the DEVINFO structure.
Return Value
The return value is TRUE if the function is successful; otherwise, it is FALSE.

Headers
Declared in winddi.h. Include winddi.h.

Comments
The input parameters to DrvTextOut define two sets of pixels: foreground and opaque. The driver must render the surface so that the result is identical to a process where the opaque pixels are rendered first with the opaque brush, and then the foreground pixels are rendered with the foreground brush. Each of these operations is limited by clipping.


The foreground and opaque pixels are regarded as a screen through which color is brushed onto the surface. The glyphs of the font do not have color in themselves.

The input parameters to DrvTextOut define the set of glyph pixels, the set of extra rectangles, the opaque rectangle, and the clip region. It is the driver\'s responsibility to calculate and then render the set of foreground and opaque pixels.

GDI guarantees that DrvTextOut and DrvDestroyFont never overlap; consequently, the driver can rely on cached information while processing a DrvTextOut call.

The mix mode defines how the incoming pattern should be mixed with the data already on the device surface. The MIX data type consists of two ROP2 values packed into a single ULONG. The low-order byte defines the foreground raster operation; the next byte defines the background raster operation. For more information about raster operation codes, see the Platform SDK documentation.

This is a conditionally required function.

See Also
CLIPOBJ, DEVINFO, FONTOBJ, STROBJ, SURFOBJ, DrvDestroyFont
小生我没钱,小生我是穷人...挥剑问情...
游客

返回顶部