DrawTextFlow

Text, Layout

Description

Draws as much of a flow as fits one box and advances its cursor

Syntax

Delphi

Function TPDFlib.DrawTextFlow(FlowID: Integer; Left, Top, Width, Height: Double): Integer;

ActiveX

Function PDFlib::DrawTextFlow(FlowID As Long, Left As Double, Top As Double, Width As Double, Height As Double) As Long

DLL

int DLDrawTextFlow(int InstanceID, int FlowID, double Left, double Top, double Width, double Height);

Parameters

FlowIDHandle returned by NewTextFlow
LeftX coordinate of the box left edge in the current coordinate system
TopY coordinate of the box top edge; coordinates are read top-down regardless of the current origin
WidthBox width in current user-space units; a no-break token may extend past a narrow box rather than split
HeightBox height in current user-space units; line height is 120 percent of the current text height

Return values

Returns the number of lines drawn, or 0 when nothing fits or the handle is invalid

Remarks

Unicode hard separators and invisible break opportunities follow NewTextFlow rules. A no-break token can extend beyond a narrow box rather than split a typographically joined expression, and supported emoji clusters remain intact at emergency breaks

A zero result leaves the flow unchanged so the caller can retry with another box

Line breaking uses the currently selected font, text size, language, and hyphenation settings, with line height equal to 120 percent of the current text height, and honors obstacle exclusion rectangles (AddTextFlowObstacle), multi-line initial drop caps (SetTextFlowDropCap), and horizontal alignment or full justification (SetTextFlowAlignment)

Coordinates read top-down regardless of the current origin

See also

DrawTextFlowColumns, MeasureTextFlow, SetTextFlowMinLines, AddTextFlowObstacle, ClearTextFlowObstacles, SetTextFlowDropCap, SetTextFlowAlignment