Arc

function Arc(const rec: TRect; startAngle, endAngle: double): TPathD;


The path follows an elliptical curve defined by the 'rec' parameter. Starting at 'startAngle' (where 0 degrees is at 3 o'clock) the ClockwiseRotationIsAnglePositive variable will determine the direction in which 'endAngle' will be located. (Angles in this library are always expressed in Radians).

uses 
  Img32, Img32.Fmt.PNG, Img32.Vector, Img32.Draw;
...
var
  path, path2: TPathD;
  rec: TRect;
  img: TImage32;
begin
  img := TImage32.create(256,256);
  rec := Rect(10,30, 256-10, 256-30);
  path := Ellipse(rec);
  DrawLine(img1, path, 20, clNavy32, esPolygon);
  path := Arc(rec, 90 *Pi/180, 360 *Pi/180);
  DrawLine(img1, path, 5, clYellow32, esRound);
  img.SaveToFile('arc.png');
  img.Free;
      

See Also

Pie, Img32