STROBJ

class _STROBJ {

ULONG cGlyphs;

FLONG flAccel;

ULONG ulCharInc;

RECTL rclBkGround;

GLYPHPOS *pgp;

PWSTR pwszOrg;

} STROBJ;

The STROBJ class, or text string object, contains an enumeration of glyph handles and positions for the device driver.

Members

cGlyphs

Specifies the number of glyphs in the STROBJ.

flAccel

Accelerator flags. This member can be any of the following values:

Flag Meaning
SO_FLAG_DEFAULT_PLACEMENT
Default increment vectors are used to position the characters.
SO_HORIZONTAL
Text is horizontal; left-to-right or right-to-left, depending on SO_REVERSED. The y coordinate is only supplied for the first glyph in the string.
SO_VERTICAL
Text is vertical; top-to-bottom or bottom-to-top, depending on SO_REVERSED. The x coordinate is only supplied for the first glyph in the string.
SO_REVERSED
Set if horizontal is right-to-left or vertical is bottom-to-top.
SO_ZERO_BEARINGS
All glyphs have zero A and zero C spacing. This bit guarantees that glyph's black boxes do not overlap.
SO_CHAR_INC_EQUAL_BM_BASE
Spacing is determined by bitmap sizes. In this context, bitmap base is defined as cx for horizontal case, cy for vertical case. This bit is set means that every glyph in a font the bitmap (supplied in GLYPHBITS structure by GDI) will have a base equal to the advance width for that glyph. This does not mean that this is a fixed pitch font. (Not used for PATHOBJs.)
SO_MAXEXT_EQUAL_BM_SIDE
Bitmaps have the same widths. In this context, bitmap side is defined as cy for horizontal case and cx for vertical case. This flag guarantees that all glyphs in the font will have the same side equal to the sum of ascender and descender. However, this bit indicates more than just a constant side. For horizontal case, this bit also indicates that the vertical distance between the top of the glyph's bitmap and its character origin is equal to the ascender for all glyphs. For vertical case, this bit indicates that the horizontal distance between the glyph's origin and "top" of the glyph's bitmap (which is really right or left, depending on whether you are writing in the direction of positive or negative y axis) is equal to the ascender. In either case, the tops and bottoms of all glyph bitmaps lay on the same line in the direction of writing. (Not used for PATHOBJs.)

ulCharInc

Specifies whether the font is a fixed-pitch (monospace) font. If it is, this member is equal to the advance width of glyphs in pels; otherwise, it is zero. When this member is nonzero, GDI supplies a valid coordinate for only the first character in the string. All other character positions must be generated by the driver by successively adding the value of this member along the writing direction.

rclBkGround

Specifies the bounding box for the string.

pgp

Points to the GLYPHPOS array for the whole string. If this member is not null, enumeration is not required.

pwszOrg

Points to the original Unicode string or cGlyphs characters. Contrary to its name, this string is not usually zero-terminated. Also, this string is not always valid, such as in journalling with printer fonts, in which case this parameter will be null.

Comments

STROBJ_vEnumStart and STROBJ_bEnum provide access to the Unicode string for the driver.

See Also

DrvGetGlyphMode , DrvTextOut