[gimp] app: handle preview generation for generated brushes separatley



commit c1dc0893bd7e2e3ed66b17be725e3a89e070fe46
Author: Alexia Death <alexiadeath gmail com>
Date:   Wed Nov 19 23:18:51 2014 +0200

    app: handle preview generation for generated brushes separatley

 app/core/gimpbrush.c |   13 +++++++++++--
 1 files changed, 11 insertions(+), 2 deletions(-)
---
diff --git a/app/core/gimpbrush.c b/app/core/gimpbrush.c
index 1a9d341..e57f0b4 100644
--- a/app/core/gimpbrush.c
+++ b/app/core/gimpbrush.c
@@ -309,8 +309,17 @@ gimp_brush_get_new_preview (GimpViewable *viewable,
         {
           gimp_brush_begin_use (brush);
 
-          mask_buf = gimp_brush_transform_mask (brush, scale,
-                                                0.0, 0.0, 1.0);
+          if (GIMP_IS_BRUSH_GENERATED (brush))
+            {
+               GimpBrushGenerated *gen_brush = GIMP_BRUSH_GENERATED (brush);
+
+               mask_buf = gimp_brush_transform_mask (brush, scale,
+                                                     0.0, 0.0,
+                                                     gimp_brush_generated_get_hardness (gen_brush));
+            }
+          else
+            mask_buf = gimp_brush_transform_mask (brush, scale,
+                                                  0.0, 0.0, 1.0);
 
           if (! mask_buf)
             {


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