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

TFlattenedPath.Path

Read-only 2D array storing all flattened polygonal sub-path contours.

Declaration ​

pascal
property Path: TArrayOfArrayOfFloatPoint read FPath;

Description ​

Path returns the accumulated 2D array of flattened polygon contours (TArrayOfArrayOfFloatPoint) generated by path drawing directives.

Each entry Path[i] contains a 1D array of float vertices (TArrayOfFloatPoint) representing a sub-path contour.

Example ​

pascal
var
  Path: TFlattenedPath;
  I: Integer;
begin
  Path := TFlattenedPath.Create;
  try
    Path.Rectangle(FloatRect(10.0, 10.0, 100.0, 100.0));
    Path.Circle(200.0, 100.0, 50.0);

    // Iterate through all flattened sub-path contours
    for I := 0 to High(Path.Path) do
      WriteLn(Format('Contour %d vertex count: %d', [I, Length(Path.Path[I])]));
  finally
    Path.Free;
  end;
end;