bezierCurveTo method

Path bezierCurveTo(
  1. double aCP1x,
  2. double aCP1y,
  3. double aCP2x,
  4. double aCP2y,
  5. double aX,
  6. double aY,
)

This creates a bezier curve from currentPoint with (cp1X, cp1Y) and (cp2X, cp2Y) as control points and updates currentPoint to x and y.

Implementation

Path bezierCurveTo(double aCP1x, double aCP1y, double aCP2x, double aCP2y, double aX, double aY) {
  final curve = CubicBezierCurve(
    currentPoint.clone(),
    Vector2(aCP1x, aCP1y),
    Vector2(aCP2x, aCP2y),
    Vector2(aX, aY)
  );

  curves.add(curve);
  currentPoint.setValues(aX, aY);
  return this;
}