Skip to content
Member Filters
Show Inherited
Show Protected
Show abstract
GR32_Paths🞂TFlattenedPath🞂PathClosedProperty

TFlattenedPath.PathClosed

Read-only boolean array indicating whether each corresponding sub-path contour in Path is closed.

Declaration ​

pascal
property PathClosed: TBooleanArray read FClosed;

Description ​

PathClosed provides a parallel boolean array aligned with Path.

For each contour index i, PathClosed[i] is True if Path[i] was completed with EndPath(True) or generated by a closed shape primitive (Rectangle, Circle, Polygon), or False if the contour remains an open line path.

Example ​

pascal
var
  Path: TFlattenedPath;
  I: Integer;
begin
  Path := TFlattenedPath.Create;
  try
    Path.MoveTo(0.0, 0.0);
    Path.LineTo(100.0, 0.0);
    Path.EndPath(False); // Open path

    Path.Rectangle(FloatRect(10.0, 10.0, 50.0, 50.0)); // Closed path

    for I := 0 to High(Path.Path) do
      if Path.PathClosed[I] then
        WriteLn(Format('Contour %d is CLOSED', [I]))
      else
        WriteLn(Format('Contour %d is OPEN', [I]));
  finally
    Path.Free;
  end;
end;