Skip to main content
Table of Contents

ITMSFNCCustomPDFGraphicsExLib.DrawRichText Method

Draws the rich text document across the specified number of columns within a rectangle and returns the overflow character count.

API unit family: TMSFNCPDFGraphicsLib Declaring type: ITMSFNCCustomPDFGraphicsExLib

Overloads

Overload 1

Draws the rich text document across the specified number of columns within a rectangle and returns the overflow character count.

FMX.TMSFNCPDFGraphicsLib.hppPascalC++
function DrawRichText(Rect: TRectF; Columns: Integer; Padding: Single = 5.0; DetectOverflow: Boolean = False): Integer; overload;
virtual int __fastcall DrawRichText(const System::Types::TRectF &Rect, int Columns, float Padding = 5.000000E+00f, bool DetectOverflow = false) = 0 /* overload */;

Parameters

Name Description
Rect Bounding rectangle for all columns in PDF coordinate units.
Columns Number of equal-width columns to flow the rich text through.
Padding Gap between adjacent columns in PDF coordinate units.
DetectOverflow When True, returns the overflow count instead of continuing to the next page.

Returns

Number of characters that did not fit; 0 means all text was drawn.

Overload 2

Draws the rich text document across the specified array of rectangles and returns the overflow character count.

FMX.TMSFNCPDFGraphicsLib.hppPascalC++
function DrawRichText(Rects: TTMSFNCPDFGraphicsLibRectArray; Padding: Single = 5.0; DetectOverflow: Boolean = False): Integer; overload;
virtual int __fastcall DrawRichText(TTMSFNCPDFGraphicsLibRectArray Rects, float Padding = 5.000000E+00f, bool DetectOverflow = false) = 0 /* overload */;

Parameters

Name Description
Rects Array of target rectangles in PDF coordinate units; text flows from one to the next.
Padding Gap between adjacent columns in PDF coordinate units.
DetectOverflow When True, returns the overflow count instead of continuing to the next page.

Returns

Number of characters that did not fit; 0 means all text was drawn.

Overload 3

Draws or measures the rich text document within the specified rectangle.

FMX.TMSFNCPDFGraphicsLib.hppPascalC++
function DrawRichText(Rect: TRectF; Calculate: Boolean = False): TRectF; overload;
virtual System::Types::TRectF __fastcall DrawRichText(const System::Types::TRectF &Rect, bool Calculate = false) = 0 /* overload */;

Parameters

Name Description
Rect Bounding rectangle for the rich text layout in PDF coordinate units.
Calculate When True, measures the text without drawing it.

Returns

Bounding rectangle of the rendered or measured rich text.