Declarations ​
pascal
procedure Ellipse(Rx, Ry: TFloat; Steps: Integer = DefaultCircleSteps); overload; virtual;
procedure Ellipse(const Cx, Cy, Rx, Ry: TFloat; Steps: Integer = DefaultCircleSteps); overload; virtual;Overload Details
Overload 1 ​
pascal
procedure Ellipse(Rx, Ry: TFloat; Steps: Integer = DefaultCircleSteps); overload; virtual;Appends an ellipse centered at CurrentPoint with radii Rx and Ry.
| Parameter | Type | Description |
|---|---|---|
Rx | TFloat | Horizontal radius. |
Ry | TFloat | Vertical radius. |
Steps | Integer | Number of linear segments used to approximate the ellipse (default is DefaultCircleSteps). |
Overload 2 ​
pascal
procedure Ellipse(const Cx, Cy, Rx, Ry: TFloat; Steps: Integer = DefaultCircleSteps); overload; virtual;Appends an ellipse centered at (Cx, Cy) with radii Rx and Ry.
| Parameter | Type | Description |
|---|---|---|
Cx, Cy | TFloat | Center X and Y coordinates. |
Rx, Ry | TFloat | Horizontal and vertical radii. |
Steps | Integer | Number of linear segments used to approximate the ellipse. |
Description ​
Ellipse constructs an elliptical closed polygon path with horizontal radius Rx and vertical radius Ry and appends it to the path builder.
- If center coordinates
(Cx, Cy)are omitted, the ellipse is centered atCurrentPoint. Stepscontrols the number of polygonal segments generated around the ellipse perimeter (defaulting toDefaultCircleSteps).
Calling Ellipse automatically starts a new closed sub-path.
Example ​
pascal
var
Canvas: TCanvas32;
begin
Canvas := TCanvas32.Create(MyBitmap);
try
// Draw an ellipse centered at (100, 100) with Rx=80, Ry=40
Canvas.Ellipse(100.0, 100.0, 80.0, 40.0);
finally
Canvas.Free;
end;
end;