ellipse method

Path ellipse(
  1. double aX,
  2. double aY,
  3. double xRadius,
  4. double yRadius,
  5. double aStartAngle,
  6. double aEndAngle, [
  7. bool? aClockwise,
  8. double? aRotation,
])

aX, aY -- The center of the ellipse offset from the last call.

xRadius -- The radius of the ellipse in the x axis.

yRadius -- The radius of the ellipse in the y axis.

aStartAngle -- The start angle in radians.

aEndAngle -- The end angle in radians.

aClockwise -- Sweep the ellipse clockwise. Defaults to false.

aRotation -- The rotation angle of the ellipse in radians, counterclockwise from the positive X axis. Optional, defaults to 0.

Adds an EllipseCurve to the path, positioned relative to currentPoint.

Implementation

Path ellipse(double aX, double aY, double xRadius, double yRadius, double aStartAngle, double aEndAngle, [bool? aClockwise, double? aRotation]) {
  final x0 = currentPoint.x;
  final y0 = currentPoint.y;

  absellipse(aX + x0, aY + y0, xRadius, yRadius, aStartAngle, aEndAngle,
      aClockwise, aRotation);

  return this;
}