[gthumb] rotator: fixed rotation when dragging the image
- From: Paolo Bacchilega <paobac src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gthumb] rotator: fixed rotation when dragging the image
- Date: Wed, 15 Aug 2012 14:17:02 +0000 (UTC)
commit ba71df910b0749f41b34cf64a6032a3cc0b9302e
Author: Paolo Bacchilega <paobac src gnome org>
Date: Wed Aug 15 16:14:14 2012 +0200
rotator: fixed rotation when dragging the image
extensions/file_tools/gth-image-rotator.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/extensions/file_tools/gth-image-rotator.c b/extensions/file_tools/gth-image-rotator.c
index 971c90e..4fdc78b 100644
--- a/extensions/file_tools/gth-image-rotator.c
+++ b/extensions/file_tools/gth-image-rotator.c
@@ -564,11 +564,11 @@ gth_image_rotator_motion_notify (GthImageViewerTool *base,
angle1 = get_angle (¢er, &self->priv->drag_p1);
angle2 = get_angle (¢er, &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);
+ if (angle < - G_PI)
+ angle = G_2_PI + angle;
+ if (angle > + G_PI)
+ angle = angle - G_2_PI;
g_signal_emit (self, signals[ANGLE_CHANGED], 0, CLAMP (RAD_TO_DEG (angle), -180.0, 180));
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]