drawEllipse method
Draws an ellipse centered at the specified coordinates and with the given radii.
The x
and y
parameters specify the center of the ellipse. The
radiusX
parameter specifies the radius of the ellipse in the horizontal
direction, and the radiusY
parameter specifies the radius of the ellipse
in the vertical direction.
The resulting ellipse is contained within the rectangle whose top-left
corner is at (x - radiusX, y - radiusY)
and whose size is (radiusX * 2, radiusY * 2)
.
This method adds the ellipse to the current path and returns this, which allows for method chaining.
Implementation
Graphics drawEllipse(double x, double y, double radiusX, double radiusY) {
_path!.addOval(
Rect.fromCenter(
center: Offset(x, y),
width: radiusX * 2,
height: radiusY * 2,
),
);
return this;
}