AggPas - Anti-Grain Geomertry for Object Pascal

TAgg2D.Arc(cx, cy, rx, ry, start, sweep)

Description

Draws a portion of the ellipse at defined center point coordinates with defined horizontal and vertical radius, starting at the start angle and ending at the sweep angle (both angles are in the clockwise direction beginning from 3 hours).

Parameters

cx: double

X coordinate of ellipse's center point [in subpixels].

cy: double

Y coordinate of ellipse's center point [in subpixels].

rx: double

Horizontal ellipse radius [in subpixels].

ry: double

Vertical ellipse radius [in subpixels].

start: double

Starting angle [in radians].

sweep: double

Ending angle [in radians].

Example

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

  VG.ClearAll(255, 255, 255);

  // Line color & width
  VG.LineColor($FF, $00, $00);
  VG.LineWidth(5);

  // Draw Arc from 45 degrees to 270 degrees 
  VG.Arc(120, 100, 80, 50, Deg2Rad(45), Deg2Rad(270));

end;

Screenshot: example