Skip to main content
Table of Contents

ITMSFNCCustomPDFGraphicsLib.CalculateHTMLText Method

Returns the bounding rectangle of the specified HTML text at the given scale, without drawing.

API unit family: TMSFNCPDFGraphicsLib Declaring type: ITMSFNCCustomPDFGraphicsLib

Overloads

Overload 1

Returns the bounding rectangle of the specified HTML text at the given scale, without drawing.

FMX.TMSFNCPDFGraphicsLib.hppPascalC++
function CalculateHTMLText(Text: UnicodeString; Scale: Single = 1.0): TRectF; overload;
virtual System::Types::TRectF __fastcall CalculateHTMLText(System::UnicodeString Text, float Scale = 1.000000E+00f) = 0 /* overload */;

Parameters

Name Description
Text HTML text to measure.
Scale Scale factor applied to the text; 1.0 means no scaling.

Returns

Bounding rectangle of the rendered text in PDF coordinate units.

Overload 2

Returns the bounding rectangle of the specified HTML text when constrained to the given rectangle.

FMX.TMSFNCPDFGraphicsLib.hppPascalC++
function CalculateHTMLText(Text: UnicodeString; Rect: TRectF; Scale: Single = 1.0): TRectF; overload;
virtual System::Types::TRectF __fastcall CalculateHTMLText(System::UnicodeString Text, const System::Types::TRectF &Rect, float Scale = 1.000000E+00f) = 0 /* overload */;

Parameters

Name Description
Text HTML text to measure.
Rect Maximum bounding rectangle for the text layout in PDF coordinate units.
Scale Scale factor applied to the text; 1.0 means no scaling.

Returns

Actual bounding rectangle used by the rendered text.