[gimp] app: Remove obsolete way of keeping track of last painted dab



commit 1b62a7bff3e4d9f2e141b87ef3403ac902310074
Author: Alexia Death <alexiadeath gmail com>
Date:   Sun Sep 11 13:18:26 2011 +0300

    app: Remove obsolete way of keeping track of last painted dab

 app/paint/gimpbrushcore.c |    6 +++---
 app/paint/gimppaintcore.c |    7 -------
 2 files changed, 3 insertions(+), 10 deletions(-)
---
diff --git a/app/paint/gimpbrushcore.c b/app/paint/gimpbrushcore.c
index 482025f..9eab1e9 100644
--- a/app/paint/gimpbrushcore.c
+++ b/app/paint/gimpbrushcore.c
@@ -665,8 +665,8 @@ gimp_brush_core_interpolate (GimpPaintCore    *paint_core,
            */
           s0 += direction;
         }
-      else if (x == (gint) floor (paint_core->last_paint.x) &&
-               y == (gint) floor (paint_core->last_paint.y))
+      else if (x == (gint) floor (last_coords.y) &&
+               y == (gint) floor (last_coords.y))
         {
           /*  Exception B: If first stripe's brush position is within the
            *  same pixel square as the last plot of the previous line,
@@ -755,6 +755,7 @@ gimp_brush_core_interpolate (GimpPaintCore    *paint_core,
         }
 
       gimp_paint_core_set_current_coords (paint_core, &current_coords);
+      gimp_paint_core_set_last_coords (paint_core, &current_coords);
 
       paint_core->distance   = initial       + t * dist;
       paint_core->pixel_dist = pixel_initial + t * pixel_dist;
@@ -772,7 +773,6 @@ gimp_brush_core_interpolate (GimpPaintCore    *paint_core,
   current_coords.velocity = last_coords.velocity + delta_velocity;
 
   gimp_paint_core_set_current_coords (paint_core, &current_coords);
-  gimp_paint_core_set_last_coords (paint_core, &current_coords);
 
   paint_core->distance   = total;
   paint_core->pixel_dist = pixel_initial + pixel_dist;
diff --git a/app/paint/gimppaintcore.c b/app/paint/gimppaintcore.c
index 7aa39c2..3783df2 100644
--- a/app/paint/gimppaintcore.c
+++ b/app/paint/gimppaintcore.c
@@ -322,13 +322,6 @@ gimp_paint_core_paint (GimpPaintCore    *core,
                              paint_state, time))
     {
 
-      if (paint_state == GIMP_PAINT_STATE_MOTION)
-        {
-          /* Save coordinates for gimp_paint_core_interpolate() */
-          core->last_paint.x = core->cur_coords.x;
-          core->last_paint.y = core->cur_coords.y;
-        }
-
       core_class->paint (core, drawable,
                          paint_options,
                          &core->cur_coords,



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