AggPas - Anti-Grain Geomertry for Object Pascal

TAgg2D.Ellipse(cx, cy, rx, ry)

Description

Draws ellipse at defined center point coordinates with defined horizontal and vertical radius.

If the two radii are equal, a circle is drawn.

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].

Example

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

  VG.ClearAll(255, 255, 255);
  Randomize;

  // Draw 100 random ellipses
  for i := 1 to 100 do begin

    VG.LineColor(random(255), random(255), random(255), random(255));
    VG.FillColor(random(255), random(255), random(255), random(255));
    VG.LineWidth(random(100) / 10);

    VG.Ellipse(random(ClientWidth - 20) + 10.5, random(ClientHeight - 20) + 10.5,
     random(Trunc(ClientWidth / 2)) + 10.5, random(Trunc(ClientHeight / 2)) + 10.5);

  end;
end;

Screenshot: example