Skip to content
Member Filters
Show Inherited
Show Protected
Show abstract
GR32_Paths🞂TCustomPath🞂EllipseMethod

TCustomPath.Ellipse

Appends an elliptical closed path to the vector path.

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.

ParameterTypeDescription
RxTFloatHorizontal radius.
RyTFloatVertical radius.
StepsIntegerNumber 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.

ParameterTypeDescription
Cx, CyTFloatCenter X and Y coordinates.
Rx, RyTFloatHorizontal and vertical radii.
StepsIntegerNumber 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 at CurrentPoint.
  • Steps controls the number of polygonal segments generated around the ellipse perimeter (defaulting to DefaultCircleSteps).

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;