[gimp/soc-2011-seamless-clone2] app: don't subtract the offset twice in zoom_xy() and transform_xy()



commit 4c4a5049fba84477320674fc1ff3763bea4db665
Author: Michael Natterer <mitch gimp org>
Date:   Thu Apr 25 09:13:30 2013 +0200

    app: don't subtract the offset twice in zoom_xy() and transform_xy()

 app/display/gimpdisplayshell-transform.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/app/display/gimpdisplayshell-transform.c b/app/display/gimpdisplayshell-transform.c
index f5364fc..28d063d 100644
--- a/app/display/gimpdisplayshell-transform.c
+++ b/app/display/gimpdisplayshell-transform.c
@@ -113,8 +113,8 @@ gimp_display_shell_zoom_xy (const GimpDisplayShell *shell,
   g_return_if_fail (nx != NULL);
   g_return_if_fail (ny != NULL);
 
-  tx = x * shell->scale_x - shell->offset_x;
-  ty = y * shell->scale_y - shell->offset_y;
+  tx = x * shell->scale_x;
+  ty = y * shell->scale_y;
 
   tx -= shell->offset_x;
   ty -= shell->offset_y;
@@ -626,8 +626,8 @@ gimp_display_shell_transform_xy (const GimpDisplayShell *shell,
   g_return_if_fail (nx != NULL);
   g_return_if_fail (ny != NULL);
 
-  tx = x * shell->scale_x - shell->offset_x;
-  ty = y * shell->scale_y - shell->offset_y;
+  tx = x * shell->scale_x;
+  ty = y * shell->scale_y;
 
   tx -= shell->offset_x;
   ty -= shell->offset_y;


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