Hide Comments
Hide Comments

TRSGPCanvas.MeasureText(TRectF,string,Boolean,TRSGPFillTextFlags,TRSGPFont,TRSGPStringAlignment,TRSGPStringAlignment) Method

Comments (0)

Measures the area occupied by a text string with the specified alignments, flag, and the specified font, on the canvas.

MeasureText is implemented by the TCanvas descendants to determine the rectangle area occupied by a text string with the specified wrapping, alignments, flag, 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).
 

Namespace: RSGdiPlusGraphics

expandingSyntax

Parameters

ARect

Type: TRectF

Bounding rectangle of the text.

AText

Type: string

Text to measure.
 

WordWrap

Type: Boolean

Word wrapping option. If it is True, it indicates that words are broken across lines to avoid text overflowing the layout box. If it is set to False, it indicates that words are kept within the same line even when the text overflows the layout box.
 

Flags

Type: TRSGPFillTextFlags

Reading direction of AText. For more information, see FMX.Graphics.TFillTextFlag.
 

Font

Type: TRSGPFont

Font of text to measure

ATextAlign

Type: TRSGPStringAlignment

Horizontal alignment of the text within ARect.

AVTextAlign

Type: TRSGPStringAlignment

Vertical alignment of the text within ARect. AVTextAlign is optional. By default, it is set to Center.
 

expandingSee Also

Comments (0)

RiverSoftAVG SVG Component Library (RSCL) © 2013-2016, Thomas G. Grubb