quadraticCurveTo method

Path quadraticCurveTo(
  1. double aCPx,
  2. double aCPy,
  3. double aX,
  4. double aY,
)

Creates a quadratic curve from currentPoint with cpX and cpY as control point and updates currentPoint to x and y.

Implementation

Path quadraticCurveTo(double aCPx, double aCPy, double aX, double aY) {
  final curve = QuadraticBezierCurve(
    currentPoint.clone(),
    Vector2(aCPx, aCPy),
    Vector2(aX, aY)
  );
  curves.add(curve);
  currentPoint.setValues(aX, aY);

  return this;
}