Table of Contents

ITMSFNCCustomPDFRichTextLib.Draw Method

Draws or measures the rich text within the specified rectangle.

API unit family: TMSFNCPDFRichTextLib Declaring type: ITMSFNCCustomPDFRichTextLib

Overloads

Overload 1

Draws or measures the rich text within the specified rectangle.

function Draw(Rect: TRectF; Calculate: Boolean = False): TRectF; overload;

Parameters

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

Returns

Bounding rectangle of the rendered or measured text.

Overload 2

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

function Draw(Rect: TRectF; Columns: Integer; Padding: Single = 5.0; DetectOverflow: Boolean = False): Integer; overload;

Parameters

Name Description
Rect Bounding rectangle for all columns combined in PDF coordinate units.
Columns Number of equal-width columns to flow the text through.
Padding Gap between adjacent columns in PDF coordinate units.
DetectOverflow When True, stops at the last fitted character and returns the overflow count.

Returns

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

Overload 3

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

function Draw(Rects: TTMSFNCPDFGraphicsLibRectArray; Padding: Single = 5.0; DetectOverflow: Boolean = False): Integer; 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, stops at the last fitted character and returns the overflow count.

Returns

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