Skip to main content
Table of Contents

TTMSFNCGraphicsContextGeneral.CalculateText Method

Calculates the bounding rectangle required to render the given text.

API unit family: TMSFNCGraphics.General Declaring type: TTMSFNCGraphicsContextGeneral

Syntax

FMX.TMSFNCGraphics.General.hppPascalC++
function CalculateText(AText: string; ARect: TRectF; AWordWrapping: Boolean): TRectF; override;
virtual System::Types::TRectF __fastcall CalculateText(System::UnicodeString AText, const System::Types::TRectF &ARect, bool AWordWrapping);

Parameters

Name Description
AText The text string to measure.
ARect The available bounding rectangle used as the measurement constraint.
AWordWrapping Set to True to allow the text to wrap across multiple lines.

Returns

The tightest rectangle that contains the rendered text.