[gimp] app: refactor all motion managment to use scale factors passed with coords



commit b161253939f36efad97bd1518a3eb13802382042
Author: Alexia Death <alexiadeath gmail com>
Date:   Fri Nov 14 22:54:27 2014 +0200

    app: refactor all motion managment to use scale factors passed with coords

 app/display/gimpdisplayshell-tool-events.c |    6 ------
 app/display/gimpmotionbuffer.c             |    6 ++----
 app/display/gimpmotionbuffer.h             |    2 --
 3 files changed, 2 insertions(+), 12 deletions(-)
---
diff --git a/app/display/gimpdisplayshell-tool-events.c b/app/display/gimpdisplayshell-tool-events.c
index f133657..484f21a 100644
--- a/app/display/gimpdisplayshell-tool-events.c
+++ b/app/display/gimpdisplayshell-tool-events.c
@@ -948,8 +948,6 @@ gimp_display_shell_canvas_tool_events (GtkWidget        *canvas,
                         if (gimp_motion_buffer_motion_event (shell->motion_buffer,
                                                              &image_coords,
                                                              history_events[i]->time,
-                                                             shell->scale_x,
-                                                             shell->scale_y,
                                                              TRUE))
                           {
                             gimp_motion_buffer_request_stroke (shell->motion_buffer,
@@ -969,8 +967,6 @@ gimp_display_shell_canvas_tool_events (GtkWidget        *canvas,
                     if (gimp_motion_buffer_motion_event (shell->motion_buffer,
                                                          &image_coords,
                                                          time,
-                                                         shell->scale_x,
-                                                         shell->scale_y,
                                                          event_fill))
                       {
                         gimp_motion_buffer_request_stroke (shell->motion_buffer,
@@ -990,8 +986,6 @@ gimp_display_shell_canvas_tool_events (GtkWidget        *canvas,
             if (gimp_motion_buffer_motion_event (shell->motion_buffer,
                                                  &image_coords,
                                                  time,
-                                                 shell->scale_x,
-                                                 shell->scale_y,
                                                  FALSE))
               {
                 gimp_motion_buffer_request_hover (shell->motion_buffer,
diff --git a/app/display/gimpmotionbuffer.c b/app/display/gimpmotionbuffer.c
index cb73a6c..f687560 100644
--- a/app/display/gimpmotionbuffer.c
+++ b/app/display/gimpmotionbuffer.c
@@ -231,8 +231,6 @@ gimp_motion_buffer_end_stroke (GimpMotionBuffer *buffer)
  * @buffer:
  * @coords:
  * @time:
- * @scale_x:
- * @scale_y:
  * @event_fill:
  *
  * This function evaluates the event to decide if the change is big
@@ -257,14 +255,14 @@ gboolean
 gimp_motion_buffer_motion_event (GimpMotionBuffer *buffer,
                                  GimpCoords       *coords,
                                  guint32           time,
-                                 gdouble           scale_x,
-                                 gdouble           scale_y,
                                  gboolean          event_fill)
 {
   gdouble  delta_time  = 0.001;
   gdouble  delta_x     = 0.0;
   gdouble  delta_y     = 0.0;
   gdouble  distance    = 1.0;
+  gdouble  scale_x     = coords->xscale;
+  gdouble  scale_y     = coords->yscale;
 
   g_return_val_if_fail (GIMP_IS_MOTION_BUFFER (buffer), FALSE);
   g_return_val_if_fail (coords != NULL, FALSE);
diff --git a/app/display/gimpmotionbuffer.h b/app/display/gimpmotionbuffer.h
index ba1b56b..2937387 100644
--- a/app/display/gimpmotionbuffer.h
+++ b/app/display/gimpmotionbuffer.h
@@ -85,8 +85,6 @@ void       gimp_motion_buffer_end_stroke           (GimpMotionBuffer *buffer);
 gboolean   gimp_motion_buffer_motion_event         (GimpMotionBuffer *buffer,
                                                     GimpCoords       *coords,
                                                     guint32           time,
-                                                    gdouble           scale_x,
-                                                    gdouble           scale_y,
                                                     gboolean          event_fill);
 guint32    gimp_motion_buffer_get_last_motion_time (GimpMotionBuffer *buffer);
 


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