[gthumb] fixed rotation when dragging the image from the first quarter



commit fd8c3314d677d2eafd415a41793e3f746d5068e0
Author: Paolo Bacchilega <paobac src gnome org>
Date:   Wed May 18 20:59:41 2011 +0200

    fixed rotation when dragging the image from the first quarter

 extensions/file_tools/gth-image-rotator.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/extensions/file_tools/gth-image-rotator.c b/extensions/file_tools/gth-image-rotator.c
index 7a39d27..cf81938 100644
--- a/extensions/file_tools/gth-image-rotator.c
+++ b/extensions/file_tools/gth-image-rotator.c
@@ -563,6 +563,8 @@ gth_image_rotator_motion_notify (GthImageViewerTool *base,
 		angle2 = get_angle (&center, &self->priv->drag_p2);
 		if (angle2 < angle1 - G_PI)
 			angle2 = G_2_PI + angle2;
+		if (angle2 > angle1 + G_PI)
+			angle2 = angle2 - G_2_PI;
 		angle = self->priv->angle_before_dragging + (angle2 - angle1);
 
 		g_signal_emit (self, signals[ANGLE_CHANGED], 0, CLAMP (RAD_TO_DEG (angle), -90.0, 90));



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]