Declaration ​
pascal
procedure EndPath(Close: boolean = False); override;Description ​
EndPath completes the active sub-path segment being constructed.
- If
CloseisTrue, the initial point of the current sub-path is appended to close the contour, and the closed path counter is incremented. - Flushes the internal working vertex buffer into a new entry in
Path, updatesPathClosed, and triggers theOnEndPathevent.
Parameters ​
| Parameter | Type | Description |
|---|---|---|
Close | Boolean | Set to True to close the contour by connecting back to the initial vertex; False leaves the contour open. |
Example ​
pascal
var
Path: TFlattenedPath;
begin
Path := TFlattenedPath.Create;
try
Path.MoveTo(10.0, 10.0);
Path.LineTo(100.0, 10.0);
Path.LineTo(100.0, 100.0);
Path.EndPath(True); // Flushes 4-point closed contour into Path[0]
finally
Path.Free;
end;
end;