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
| FlowID | A text flow identifier returned by NewTextFlow |
|---|---|
| Left | Horizontal coordinate of the left edge of the obstacle rectangle in current document units |
| Top | Vertical coordinate of the top edge of the obstacle rectangle in current document units |
| Width | Width of the obstacle rectangle in current document units |
| Height | Height of the obstacle rectangle in current document units |
Return values
| 1 | The obstacle rectangle was registered on the text flow |
|---|---|
| 0 | The 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