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

TFlattenedPath.MoveTo

Starts a new sub-path contour at coordinate P, implicitly finalizing any prior open sub-path.

Declaration ​

pascal
procedure MoveTo(const P: TFloatPoint); override;

Parameters ​

ParameterTypeDescription
PTFloatPointTarget starting point for the new sub-path.

Description ​

MoveTo implicitly ends any currently active sub-path segment by calling EndPath, updates CurrentPoint to P, and registers P as the first vertex of a new sub-path contour.

Example ​

pascal
var
  Path: TFlattenedPath;
begin
  Path := TFlattenedPath.Create;
  try
    Path.MoveTo(FloatPoint(20.0, 20.0));
    Path.LineTo(80.0, 20.0);
    // Calling MoveTo implicitly ends the previous segment
    Path.MoveTo(FloatPoint(20.0, 60.0));
    Path.LineTo(80.0, 60.0);
    Path.EndPath;
  finally
    Path.Free;
  end;
end;