TTMSFNCGraphicsContext.CalculateText Method
Measures the bounding rectangle of
ATextrendered insideARectwith optional word-wrapping.
API unit family: TMSFNCGraphics
Declaring type: TTMSFNCGraphicsContext
Syntax
function CalculateText(AText: string; ARect: TRectF; AWordWrapping: Boolean): TRectF; virtual; abstract;
Parameters
| Name | Description |
|---|---|
AText |
Text string to measure. |
ARect |
Constraint rectangle that limits available rendering width. |
AWordWrapping |
When True, wraps text at word boundaries within ARect. |
Returns
Tightest bounding rectangle enclosing the rendered text.