[gimp/soc-2012-unified-transformation: 25/52] transformtool: Add todo about pivot point



commit 5c1bdb7835189a26d6ae2be3a155b8d55ef426bb
Author: Mikael Magnusson <mikachu src gnome org>
Date:   Mon Jun 18 12:19:58 2012 +0200

    transformtool: Add todo about pivot point
    
    Move pivot with frame, needs to do so for all operations

 app/tools/gimpunifiedtransformtool.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/app/tools/gimpunifiedtransformtool.c b/app/tools/gimpunifiedtransformtool.c
index 117ae51..535310c 100644
--- a/app/tools/gimpunifiedtransformtool.c
+++ b/app/tools/gimpunifiedtransformtool.c
@@ -772,6 +772,8 @@ gimp_unified_transform_tool_motion (GimpTransformTool *transform_tool)
   px[4] = (px[0] + px[1] + px[2] + px[3]) / 4.;
   py[4] = (py[0] + py[1] + py[2] + py[3]) / 4.;
 
+  //TODO: pivot point must transform along with the frame in all
+  //transformations, not just move
   pivot_x = &transform_tool->trans_info[PIVOT_X];
   pivot_y = &transform_tool->trans_info[PIVOT_Y];
 
@@ -807,6 +809,8 @@ gimp_unified_transform_tool_motion (GimpTransformTool *transform_tool)
         *x[i] = px[i] + dx;
         *y[i] = py[i] + dy;
       }
+      *pivot_x = ppivot_x + dx;
+      *pivot_y = ppivot_y + dy;
     }
 
   /* rotate */
@@ -1012,6 +1016,7 @@ gimp_unified_transform_tool_motion (GimpTransformTool *transform_tool)
         }
     }
 
+  /* scaling via sides */
   if (function == TRANSFORM_HANDLE_N ||
       function == TRANSFORM_HANDLE_E ||
       function == TRANSFORM_HANDLE_S ||



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