ITMSFNCCustomPDFGraphicsLib.CalculateText Method
Returns the bounding rectangle of the specified plain text using the current font, without drawing.
API unit family: TMSFNCPDFGraphicsLib
Declaring type: ITMSFNCCustomPDFGraphicsLib
Overloads
Overload 1
Returns the bounding rectangle of the specified plain text using the current font, without drawing.
function CalculateText(Text: UnicodeString): TRectF; overload;
Parameters
| Name | Description |
|---|---|
Text |
Plain text string to measure. |
Returns
Bounding rectangle of the text in PDF coordinate units.
Overload 2
Returns the bounding rectangle of the specified plain text when constrained to the given rectangle.
function CalculateText(Text: UnicodeString; Rect: TRectF): TRectF; overload;
Parameters
| Name | Description |
|---|---|
Text |
Plain text string to measure. |
Rect |
Maximum bounding rectangle for the text layout in PDF coordinate units. |
Returns
Actual bounding rectangle used by the laid-out text.