New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: Drawing while pinch-zooming does not work. #45
Comments
I think it's a bit complicated to have the first finger as pivot point. Currently I cannot get the first finger so simple. Is it okay, if I disable the drawing when zooming? |
Confirmed on all platforms |
My suggested scheme interrupts drawing when zooming, i.e. no new segment should be added to stroke when both fingers are touched down. Or did you mean "disable the zooming when drawing"?
Finger, which position on screen is closest to the last remembered position of the lone (pre-zoom) finger should be considered first (and that position coordinates is to be updated each step).
Not doing it (one way or another) would result in unintended stroke segments being added to scene after zooming is done. What is the complication? Is Flutter not multitouch-ready, so your program receive only partial information about multi-touch events? Or are algorithms and mathematics too complex to implement? |
I think, currently I only get a pointer if the user moves the pointer. I can google longer, but currently I cannot find a solution which helps me implement this |
https://api.flutter.dev/flutter/gestures/PointerEvent/pointer.html maybe this? I will try it |
Even with no special fields, coordinates of all events may be monitored and receiving an event from a touchscreen with substantially different coordinates while having not previously received "up" event from previous location can imply that multi-touch is active and the new event is the second finger.
|
I will add options how to interact with multiple inputs to customize if you want to use the second input as zooming/moving or as new input to draw |
What happened?
#20 is said to be resolved. Yet it still see it on Android, even with the recent commit:
paint.mp4
Expected:
It zooms in/out using first (actively drawing) finger as pivot point if second finger is moved. It scrolls the canvas around if both fingers are moved (such as after finishing the temporary zoom/pan mode it would continue drawing the stroke without any long straight segments).
Actual:
It removes already drawn part, then starts drawing a zigzag line between fingers.
Note:
Filling area between fingers (using a proper closed curve, not a zigzagging line) can be a special, distinct touchscreen-exclusive drawing tool.
Version
build from cebe815, devel branch
Platform
Android
Relevant log output
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: