Description
Measures the extent of the string in the
specified font, format, and layout rectangle.
Syntax
GpStatus WINGDIPAPI GdipMeasureString(
GpGraphics
*graphics,
GDIPCONST WCHAR
*string,
INT length,
GDIPCONST
GpFont *font,
GDIPCONST RectF
*layoutRect,
GDIPCONST
GpStringFormat *stringFormat,
RectF
*boundingBox,
INT
*codepointsFitted,
INT *linesFilled
);
PowerBASIC Syntax
DECLARE FUNCTION GdipMeasureString ( _
BYVAL graphics
AS DWORD, _
BYVAL pString
AS STRING, _
BYVAL length AS
LONG, _
BYVAL pFont AS
DWORD, _
BYREF
layoutRect AS RectF, _
BYVAL
stringFormat AS DWORD, _
BYREF
boundingBox AS RectF, _
BYREF
codepointsFitted AS LONG, _
BYREF
linesFilled AS LONG _
) AS LONG
Parameters
graphics
[in] Pointer to the
Graphics
object.
string
[in] Pointer to a wide-character string to be
measured.
length
[in] Integer that specifies the number of
characters in the string array. The length parameter can be set to 1 if
the string is null terminated.
font
[in] Pointer to a
Font
object that specifies the family name, size, and style of the font to
be applied to the string.
layoutRect
[in] Reference to the rectangle that bounds
the string.
stringFormat
[in] Pointer to a
StringFormat
object that specifies the layout information, such as alignment,
trimming, tab stops, and so forth.
boundingBox
[out] Pointer to a
RectF
structure that receives the rectangle that bounds the string.
codePointsFitted
[out] Pointer to an
LONG
that receives the number of characters that actually fit into the
layout rectangle. The default value is a NULL pointer.
linesFilled
[out] Pointer to an
LONG
that receives the number of lines that fit into the layout rectangle.
The default value is a NULL pointer.
|