bezier2To method

void bezier2To(
  1. Offset target,
  2. Offset control
)

The parameters of iOS and Android/flutter are inconsistent and need to be converted. For the time being, consistency cannot be guaranteed, delete it first.

Consider adding back in future versions (may not) Add bezier curve.

The target is the end point of the curve, and the control

Implementation

// void arcTo(Rect rect, double startAngle, double sweepAngle, bool useCenter,
//     DrawPaint paint) {
//   parts.add(
//     _ArcToPathPart(
//       rect: rect,
//       startAngle: startAngle,
//       sweepAngle: sweepAngle,
//       useCenter: useCenter,
//     ),
//   );
// }

/// Add bezier curve.
///
/// The [target] is the end point of the curve, and the [control]
void bezier2To(Offset target, Offset control) {
  _parts.add(
    _BezierPathPart(
      target: target,
      control1: control,
      control2: null,
      kind: 2,
    ),
  );
}