absellipse method

dynamic absellipse(
  1. dynamic aX,
  2. dynamic aY,
  3. dynamic xRadius,
  4. dynamic yRadius,
  5. dynamic aStartAngle,
  6. dynamic aEndAngle,
  7. dynamic aClockwise,
  8. dynamic aRotation,
)

Implementation

absellipse(
    aX, aY, xRadius, yRadius, aStartAngle, aEndAngle, aClockwise, aRotation) {
  var curve = EllipseCurve(aX, aY, xRadius, yRadius, aStartAngle,
      aEndAngle, aClockwise, aRotation);

  if (curves.isNotEmpty) {
    // if a previous curve is present, attempt to join
    var firstPoint = curve.getPoint(0, null);

    if (!firstPoint.equals(currentPoint)) {
      lineTo(firstPoint.x, firstPoint.y);
    }
  }

  curves.add(curve);

  var lastPoint = curve.getPoint(1, null);
  currentPoint.copy(lastPoint);

  return this;
}