Graphics.MeasureDriverString method

Applies to: desktop apps only

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
) const;

Parameters

text [in]

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.

length [in]

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.

font [in]

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.

positions [in]

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.

flags [in]

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.

matrix [in]

Type: const Matrix*

Pointer to a Matrix object that specifies the transformation matrix to apply to each value in the text array.

boundingBox [out]

Type: RectF*

Pointer to a RectF object that receives the rectangle that bounds the string.

Return value

Type:

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

Minimum supported client

Windows XP, Windows 2000 Professional

Minimum supported server

Windows 2000 Server

Product

GDI+ 1.0

Header

Gdiplusgraphics.h (include Gdiplus.h)

Library

Gdiplus.lib

DLL

Gdiplus.dll

See also

Graphics
Graphics::DrawDriverString
DriverStringOptions
Font
Matrix
RectF
SolidBrush

 

 

Send comments about this topic to Microsoft

Build date: 3/6/2012

Community Additions

ADD
Show: