Fixed path flipping logic in Calligraphy tool with tilt-sensitive pen
This fixes spurious path flips when drawing with "Use the tilt of the input device to alter the angle of the pen's nib" enabled.
Illustration of the problem:
The core issue was that the flipping logic required that the computed input angle a1 lies between -90 and 90 degrees, which was not the case when using pen tilt.
I tested this in the following scenarios:
-
hand drawing with pen tilt enabled and all possible pen orientations in regard to path direction (incl. holding pen in awkward orientations)
-
drawing with fixed angle, verified that the nib angle is the same as before the change
-
all the cases with both Y axis flipped and not flipped
Edited by Szymon Acedański