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



commit 0c275be646106d965a76897da155bff09ada4ab1
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/gimpunifiedtransformationtool.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/app/tools/gimpunifiedtransformationtool.c b/app/tools/gimpunifiedtransformationtool.c
index f5fdf99..f2b1460 100644
--- a/app/tools/gimpunifiedtransformationtool.c
+++ b/app/tools/gimpunifiedtransformationtool.c
@@ -778,6 +778,8 @@ gimp_unified_transformation_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];
 
@@ -813,6 +815,8 @@ gimp_unified_transformation_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 */
@@ -1018,6 +1022,7 @@ gimp_unified_transformation_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]