Danishkhan788 / android-multitouch-controller

Automatically exported from code.google.com/p/android-multitouch-controller
0 stars 0 forks source link

MTPhotoSortrDemo rotates around image center, not pinch center #6

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
When pinch-rotating images in MTPhotoSortrDemo, they rotate around the center 
of the image, not around the center of the pinch. Reported by Ralf (mr_roots).

The short-term solution is to figure out where the pinch center is within the 
image when a pinch operation starts, then "pin" the center of the pinch to this 
location, and rotate the image center position about this point.

The best long-term / general-purpose solution is to implement full affine 
homogeneous matrices for all operations. However, this is slower, and it then 
gets more complicated to extract transform parameters in simpler use cases, 
such as when just the pinch distance and center is needed.

Original issue reported on code.google.com by luke.hutch on 22 Apr 2012 at 4:34