Graphics::MeasureDriverString method (gdiplusgraphics.h)
The Graphics::MeasureDriverString method measures the bounding box for the specified characters and their corresponding positions.
Syntax
Status MeasureDriverString(
[in] const UINT16 *text,
[in] INT length,
[in] const Font *font,
[in] const PointF *positions,
[in] INT flags,
[in] const Matrix *matrix,
[out] RectF *boundingBox
);
Parameters
[in] text
Type: const UINT16*
Pointer to an array of 16-bit values. If the DriverStringOptionsCmapLookup flag is set, each value specifies a Unicode character to be displayed. Otherwise, each value specifies an index to a font glyph that defines a character to be displayed.
[in] length
Type: INT
Integer that specifies the number of values in the text array. The length parameter can be set to –1 if the string is null terminated.
[in] font
Type: const Font*
Pointer to a Font object that specifies the family name, size, and style of the font to be applied to the string.
[in] positions
Type: const PointF*
If the DriverStringOptionsRealizedAdvance flag is set, positions is a pointer to a PointF object that specifies the position of the first glyph. Otherwise, positions is an array of PointF objects, each of which specifies the origin of an individual glyph.
[in] flags
Type: INT
Integer that specifies the options for the appearance of the string. This value must be an element of the DriverStringOptions enumeration or the result of a bitwise OR applied to two or more of these elements.
[in] matrix
Type: const Matrix*
Pointer to a Matrix object that specifies the transformation matrix to apply to each value in the text array.
[out] boundingBox
Type: RectF*
Pointer to a RectF object that receives the rectangle that bounds the string.
Return value
Type: Status
If the method succeeds, it returns Ok, which is an element of the Status enumeration.
If the method fails, it returns one of the other elements of the Status enumeration.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows XP, Windows 2000 Professional [desktop apps only] |
Minimum supported server | Windows 2000 Server [desktop apps only] |
Target Platform | Windows |
Header | gdiplusgraphics.h (include Gdiplus.h) |
Library | Gdiplus.lib |
DLL | Gdiplus.dll |