generatePath method
Generates the actual path for the circle shape.
Creates a perfect circle that fits within the given rectangle. The circle's center is positioned at the center of the rectangle, and its radius is determined by the smaller of the width or height dimensions to ensure the circle fits completely.
useBezier
- Optional parameter for future Bézier curve support (currently unused).
rect
- The bounding rectangle that defines the drawing area.
Returns a Path object with the circle's geometric outline.
Implementation
Path generatePath({bool? useBezier, required Rect rect}) {
return Path()..addOval(
Rect.fromCircle(
center: Offset(rect.width / 2.0, rect.height / 2.0),
radius: min(rect.width / 2.0, rect.height / 2.0),
),
);
}