diff options
author | Manuel QuiƱones <manuq@laptop.org> | 2013-05-15 18:13:10 (GMT) |
---|---|---|
committer | Agustin Zubiaga <aguz@localhost.localdomain> | 2013-06-03 19:07:00 (GMT) |
commit | 38245d9f4c51fc1af29a326392939138ef137f08 (patch) | |
tree | 0933624306447a7de1935d4c7d8e77fa9e0a55ff /ImageViewerActivity.py | |
parent | b0e066894ab52d4dc7a8e7273b04d885953b870b (diff) |
Improve pinch to zoom, add rotation
Center the image between the touch points.
Diffstat (limited to 'ImageViewerActivity.py')
-rw-r--r-- | ImageViewerActivity.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/ImageViewerActivity.py b/ImageViewerActivity.py index ab1424c..1d222d7 100644 --- a/ImageViewerActivity.py +++ b/ImageViewerActivity.py @@ -289,12 +289,10 @@ class ImageViewerActivity(activity.Activity): self._update_zoom_buttons() def __rotate_anticlockwise_cb(self, button): - angle = self.view.angle - math.pi / 2 - self.view.set_angle(angle) + self.view.rotate_anticlockwise() def __rotate_clockwise_cb(self, button): - angle = self.view.angle + math.pi / 2 - self.view.set_angle(angle) + self.view.rotate_clockwise() def __fullscreen_cb(self, button): self.fullscreen() |