Measures the area occupied by a text string with the specified alignments, flag, and the specified font, on the canvas.
MeasureText determines the rectangle area occupied by a text string with the specified text layout information and specified font. The string text is framed in a rectangle.
The ARect parameter specifies the bounding rectangle of the text. ARect is the return variable. If ARect is not initialized, the returned rectangle is centered in (0,0).
The StringFormat object specifies text layout information (such as alignment, orientation, tab stops, and clipping) and display manipulations (such as trimming, font substitution for characters that are not supported by the requested font, and digit substitution for languages that do not use Western European digits).
Namespace: RSGdiPlusGraphics
Delphi |
public |
Parameters
ARect
Type: TRectF
Bounding rectangle of the text.
AText
Type: string
Text to measure.
StringFormat
Type: TRSGPStringFormat
Text Layout Information
Font
Type: TRSGPFont
Font of text to measure