[gimp] app: Fix smooth intreaction with airbrush



commit 41b1bd36da98da67c61b3b2bf1598608a575712f
Author: Alexia Death <alexiadeath gmail com>
Date:   Wed Mar 16 22:06:39 2011 +0200

    app: Fix smooth intreaction with airbrush

 app/paint/gimpairbrush.c  |    2 +-
 app/paint/gimpbrushcore.c |    4 ++--
 app/paint/gimppaintcore.c |    9 +++++++--
 app/paint/gimppaintcore.h |    1 +
 4 files changed, 11 insertions(+), 5 deletions(-)
---
diff --git a/app/paint/gimpairbrush.c b/app/paint/gimpairbrush.c
index 936f450..5d7e512 100644
--- a/app/paint/gimpairbrush.c
+++ b/app/paint/gimpairbrush.c
@@ -219,7 +219,7 @@ gimp_airbrush_timeout (gpointer data)
   GimpAirbrush *airbrush = GIMP_AIRBRUSH (data);
   GimpCoords    coords;
 
-  gimp_paint_core_get_current_coords (GIMP_PAINT_CORE (airbrush), &coords);
+  gimp_paint_core_get_current_coords (GIMP_PAINT_CORE (airbrush), airbrush->paint_options, &coords);
 
   gimp_airbrush_paint (GIMP_PAINT_CORE (airbrush),
                        airbrush->drawable,
diff --git a/app/paint/gimpbrushcore.c b/app/paint/gimpbrushcore.c
index 5542e4d..6fd1813 100644
--- a/app/paint/gimpbrushcore.c
+++ b/app/paint/gimpbrushcore.c
@@ -338,7 +338,7 @@ gimp_brush_core_pre_paint (GimpPaintCore    *paint_core,
       gdouble scale;
 
       gimp_paint_core_get_last_coords (paint_core, &last_coords);
-      gimp_paint_core_get_current_coords (paint_core, &current_coords);
+      gimp_paint_core_get_current_coords (paint_core, paint_options, &current_coords);
 
       /* If we current point == last point, check if the brush
        * wants to be painted in that case. (Direction dependent
@@ -523,7 +523,7 @@ gimp_brush_core_interpolate (GimpPaintCore    *paint_core,
   g_return_if_fail (GIMP_IS_BRUSH (core->brush));
 
   gimp_paint_core_get_last_coords (paint_core, &last_coords);
-  gimp_paint_core_get_current_coords (paint_core, &current_coords);
+  gimp_paint_core_get_current_coords (paint_core, paint_options, &current_coords);
 
   /*  Zero sized brushes are unfit for interpolate, so we just let
    *  paint core fail onits own
diff --git a/app/paint/gimppaintcore.c b/app/paint/gimppaintcore.c
index 5f75db1..8757f64 100644
--- a/app/paint/gimppaintcore.c
+++ b/app/paint/gimppaintcore.c
@@ -629,13 +629,18 @@ gimp_paint_core_set_current_coords (GimpPaintCore    *core,
 }
 
 void
-gimp_paint_core_get_current_coords (GimpPaintCore *core,
-                                    GimpCoords    *coords)
+gimp_paint_core_get_current_coords (GimpPaintCore    *core,
+                                    GimpPaintOptions *paint_options,
+                                    GimpCoords       *coords)
 {
   g_return_if_fail (GIMP_IS_PAINT_CORE (core));
   g_return_if_fail (coords != NULL);
 
   *coords = core->cur_coords;
+
+  gimp_paint_core_smooth_coords (core,
+                                 paint_options,
+                                 coords);
 }
 
 void
diff --git a/app/paint/gimppaintcore.h b/app/paint/gimppaintcore.h
index c9038b1..f91d718 100644
--- a/app/paint/gimppaintcore.h
+++ b/app/paint/gimppaintcore.h
@@ -140,6 +140,7 @@ void      gimp_paint_core_interpolate               (GimpPaintCore    *core,
 void      gimp_paint_core_set_current_coords        (GimpPaintCore    *core,
                                                      const GimpCoords *coords);
 void      gimp_paint_core_get_current_coords        (GimpPaintCore    *core,
+                                                     GimpPaintOptions *paint_options,
                                                      GimpCoords       *coords);
 
 void      gimp_paint_core_set_last_coords           (GimpPaintCore    *core,



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