AggPas - Anti-Grain Geomertry for Object Pascal

TAgg2D.MoveTo(x, y)

Description

Changes position of the Current Point by setting it to the defined coordinates.

If there is already an unclosed subpath defined, this method creates a new subpath leaving the previous one opened.

Parameters

x: double

X coordinate of a new position of Current Point [in subpixels].

y: double

Y coordinate of a new position of Current Point [in subpixels].

Example

if VG.Attach(Image1.Picture.Bitmap) then begin

  VG.ClearAll (255, 255, 255);
  VG.FillColor($FF, $00, $00);

  // First subpath comprising of a single line
  VG.MoveTo(10, 10);
  VG.LineTo(50, 50);

  // Creating a new subpath with MoveTo method
  VG.MoveTo(100, 100);
  VG.LineTo(200, 100);
  VG.LineTo(180, 50);
  VG.ClosePolygon;

  // Render path 
  VG.DrawPath(AGG_FillAndStroke);

end;

Screenshot: example