[gimp] app: Do not show brush outline when painting



commit 031dc8e68ac9dd52322112c1e356ad9e66b9fcf9
Author: Alexia Death <alexiadeath gmail com>
Date:   Tue Mar 16 23:48:56 2010 +0200

    app: Do not show brush outline when painting
    
    It takes resourses and jsut gets in the way of seeing the real brush

 app/tools/gimpbrushtool.c |    9 +++++----
 app/tools/gimpbrushtool.h |    1 +
 2 files changed, 6 insertions(+), 4 deletions(-)
---
diff --git a/app/tools/gimpbrushtool.c b/app/tools/gimpbrushtool.c
index e276768..108c432 100644
--- a/app/tools/gimpbrushtool.c
+++ b/app/tools/gimpbrushtool.c
@@ -115,6 +115,7 @@ gimp_brush_tool_init (GimpBrushTool *brush_tool)
                                          "context/context-brush-select-set");
 
   brush_tool->show_cursor = TRUE;
+  brush_tool->in_motion   = FALSE;
   brush_tool->draw_brush  = TRUE;
   brush_tool->brush_x     = 0.0;
   brush_tool->brush_y     = 0.0;
@@ -194,7 +195,7 @@ gimp_brush_tool_motion (GimpTool         *tool,
       brush_tool->brush_x = coords->x;
       brush_tool->brush_y = coords->y;
     }
-
+  brush_tool->in_motion = TRUE;
   gimp_draw_tool_resume (GIMP_DRAW_TOOL (tool));
 }
 
@@ -243,7 +244,7 @@ gimp_brush_tool_oper_update (GimpTool         *tool,
                                                    coords);
         }
     }
-
+    brush_tool->in_motion = FALSE;
   gimp_draw_tool_resume (GIMP_DRAW_TOOL (tool));
 }
 
@@ -318,7 +319,7 @@ gimp_brush_tool_draw_brush (GimpBrushTool *brush_tool,
   if (brush_core->brush_bound_segs)
       gimp_brush_core_transform_bound_segs (brush_core, options);
 
-  if (brush_core->transformed_brush_bound_segs)
+  if ((brush_core->transformed_brush_bound_segs) && !(brush_tool->in_motion))
     {
       GimpDisplayShell *shell  = gimp_display_get_shell (draw_tool->display);
       gdouble           width  = brush_core->transformed_brush_bound_width;
@@ -348,7 +349,7 @@ gimp_brush_tool_draw_brush (GimpBrushTool *brush_tool,
                                         x, y,
                                         FALSE);
         }
-      else if (draw_fallback)
+      else if ((draw_fallback) || (brush_tool->in_motion))
         {
           gimp_draw_tool_draw_handle (draw_tool, GIMP_HANDLE_CROSS,
                                       x, y,
diff --git a/app/tools/gimpbrushtool.h b/app/tools/gimpbrushtool.h
index 7bea526..b1a7df0 100644
--- a/app/tools/gimpbrushtool.h
+++ b/app/tools/gimpbrushtool.h
@@ -38,6 +38,7 @@ struct _GimpBrushTool
 
   gboolean       show_cursor;
   gboolean       draw_brush;
+  gboolean       in_motion;
   gdouble        brush_x;
   gdouble        brush_y;
 };



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