drawPath method

void drawPath(
  1. Path path,
  2. Paint paint, {
  3. HitTestBehavior? hitTestBehavior,
  4. GestureTapDownCallback? onTapDown,
  5. PaintingStyle? paintStyleForTouch,
  6. GestureTapCallback? onTap,
  7. GestureTapUpCallback? onTapUp,
  8. GestureLongPressStartCallback? onLongPressStart,
  9. GestureLongPressEndCallback? onLongPressEnd,
  10. GestureLongPressMoveUpdateCallback? onLongPressMoveUpdate,
  11. GestureForcePressStartCallback? onForcePressStart,
  12. GestureForcePressEndCallback? onForcePressEnd,
  13. GestureForcePressPeakCallback? onForcePressPeak,
  14. GestureForcePressUpdateCallback? onForcePressUpdate,
  15. GestureDragStartCallback? onPanStart,
  16. GestureDragUpdateCallback? onPanUpdate,
  17. GestureDragDownCallback? onPanDown,
  18. GestureTapDownCallback? onSecondaryTapDown,
  19. GestureTapUpCallback? onSecondaryTapUp,
})

Implementation

void drawPath(
  Path path,
  Paint paint, {
  HitTestBehavior? hitTestBehavior,
  GestureTapDownCallback? onTapDown,
  PaintingStyle? paintStyleForTouch,
  GestureTapCallback? onTap,
  GestureTapUpCallback? onTapUp,
  GestureLongPressStartCallback? onLongPressStart,
  GestureLongPressEndCallback? onLongPressEnd,
  GestureLongPressMoveUpdateCallback? onLongPressMoveUpdate,
  GestureForcePressStartCallback? onForcePressStart,
  GestureForcePressEndCallback? onForcePressEnd,
  GestureForcePressPeakCallback? onForcePressPeak,
  GestureForcePressUpdateCallback? onForcePressUpdate,
  GestureDragStartCallback? onPanStart,
  GestureDragUpdateCallback? onPanUpdate,
  GestureDragDownCallback? onPanDown,
  GestureTapDownCallback? onSecondaryTapDown,
  GestureTapUpCallback? onSecondaryTapUp,
}) {
  _canvas.drawPath(path, paint);
  _shapeHandler.addShape(PathShape(path,
      paint: paint,
      hitTestBehavior: hitTestBehavior,
      gestureMap: TouchCanvasUtil.getGestureCallbackMap(
        onTapDown: onTapDown,
        onTapUp: onTapUp,
        onLongPressStart: onLongPressStart,
        onLongPressEnd: onLongPressEnd,
        onLongPressMoveUpdate: onLongPressMoveUpdate,
        onForcePressStart: onForcePressStart,
        onForcePressEnd: onForcePressEnd,
        onForcePressPeak: onForcePressPeak,
        onForcePressUpdate: onForcePressUpdate,
        onPanStart: onPanStart,
        onPanUpdate: onPanUpdate,
        onPanDown: onPanDown,
        onSecondaryTapDown: onSecondaryTapDown,
        onSecondaryTapUp: onSecondaryTapUp,
      )));
}