Declarations ​
pascal
procedure Circle(const Cx, Cy, Radius: TFloat; Steps: Integer = DefaultCircleSteps); overload; virtual;
procedure Circle(const Center: TFloatPoint; Radius: TFloat; Steps: Integer = DefaultCircleSteps); overload; virtual;Overload Details
Overload 1 ​
pascal
procedure Circle(const Cx, Cy, Radius: TFloat; Steps: Integer = DefaultCircleSteps); overload; virtual;Appends a circle centered at (Cx, Cy) with specified radius.
| Parameter | Type | Description |
|---|---|---|
Cx, Cy | TFloat | Center X and Y coordinates. |
Radius | TFloat | Circle radius. |
Steps | Integer | Number of linear segments used to approximate the circle (default is DefaultCircleSteps). |
Overload 2 ​
pascal
procedure Circle(const Center: TFloatPoint; Radius: TFloat; Steps: Integer = DefaultCircleSteps); overload; virtual;Appends a circle centered at Center point with specified radius.
| Parameter | Type | Description |
|---|---|---|
Center | TFloatPoint | Center point. |
Radius | TFloat | Circle radius. |
Steps | Integer | Number of linear segments used to approximate the circle. |
Description ​
Circle constructs a circular closed polygon path centered at (Cx, Cy) or Center with specified Radius and appends it to the path builder.
Stepscontrols the number of polygonal segments generated around the circular perimeter (defaulting toDefaultCircleSteps).
Calling Circle automatically starts a new closed sub-path.
Example ​
pascal
var
Canvas: TCanvas32;
begin
Canvas := TCanvas32.Create(MyBitmap);
try
// Draw a circle centered at (150, 150) with radius 50
Canvas.Circle(150.0, 150.0, 50.0);
finally
Canvas.Free;
end;
end;