AddTextFlowObstacle

Text and typography

Description

Adds a rectangular obstacle region to a text flow so subsequent calls to DrawTextFlow and DrawTextFlowColumns wrap lines around the excluded box

Syntax

Delphi

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

Parameters

FlowIDA text flow identifier returned by NewTextFlow
LeftHorizontal coordinate of the left edge of the obstacle rectangle in current document units
TopVertical coordinate of the top edge of the obstacle rectangle in current document units
WidthWidth of the obstacle rectangle in current document units
HeightHeight of the obstacle rectangle in current document units

Return values

1The obstacle rectangle was registered on the text flow
0The FlowID was invalid or the rectangle dimensions were non-positive

Remarks

Multiple obstacles may be registered on the same text flow; when obstacles split a line band into multiple segments, the widest available horizontal segment on that line is selected

See also

NewTextFlow, ClearTextFlowObstacles, DrawTextFlow, DrawTextFlowColumns