EP-u-NW / painter

A simple flutter widget to paint with your fingers
https://pub.dev/packages/painter
Other
137 stars 66 forks source link

Pinch to zoom capabilities #31

Open huemerS8 opened 3 years ago

huemerS8 commented 3 years ago

I am working on an App, where we want to draw with one finger and pinch to zoom with two fingers without pressing a button in between. Our problem is, that the drawing do not work properly, if we zoom in and try to draw because the image moves when drawing. Are there any solutions for this problem?

bdlukaa commented 3 years ago

Are you using the InteractiveViewer widget?

huemerS8 commented 3 years ago

Yes

NTJ3 commented 3 years ago

I'm facing the same issue, Someone has an idea how to deal with it?

EP-u-NW commented 3 years ago

I've currently no time to update this widget or do much support but here is a guess:

  1. Wrap the PainterController in an IgnorePointer
  2. Try using the GestureScaleStartCallback of the InteractiveViewer (and respectivly the GestureScaleEndCallback) to set the ignoring bool of the IgnorePointer to true (and false respectivly)

Report back if that worked 😃