Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/ImageViewerActivity.py
diff options
context:
space:
mode:
authorManuel Kaufmann <humitos@gmail.com>2012-10-23 13:41:05 (GMT)
committer Agustin Zubiaga <aguz@sugarlabs.org>2012-10-24 00:08:09 (GMT)
commit345479e7ba40ceef04065c4604cd4e651e53741a (patch)
tree2c79c3408d2f4e30d00092246b8ac58287528135 /ImageViewerActivity.py
parent20ba359060e4fa83c2f5272643dab93df909ca27 (diff)
Rotate, Zoom and center the image
Improves the rotation by centering the image on the screen when it is smaller than the screen size. Optimal zoom is calculated for images than are higher in hight when they are rotated as well. Fixed rotation (anti)clockwise. X, Y axis + angles in gradians are handled different by cairo. Signed-off-by: Manuel Kaufmann <humitos@gmail.com> Signed-off-by: Agustin Zubiaga <aguz@sugarlabs.org>
Diffstat (limited to 'ImageViewerActivity.py')
-rw-r--r--ImageViewerActivity.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/ImageViewerActivity.py b/ImageViewerActivity.py
index f17d4cf..3b36103 100644
--- a/ImageViewerActivity.py
+++ b/ImageViewerActivity.py
@@ -310,11 +310,11 @@ class ImageViewerActivity(activity.Activity):
self.view.set_zoom(1)
def __rotate_anticlockwise_cb(self, button):
- angle = self.view.angle + math.pi / 2
+ angle = self.view.angle - math.pi / 2
self.view.set_angle(angle)
def __rotate_clockwise_cb(self, button):
- angle = self.view.angle - math.pi / 2
+ angle = self.view.angle + math.pi / 2
self.view.set_angle(angle)
def __fullscreen_cb(self, button):