[gimp] app: fix brush offset when shrinking to compensate for blur
- From: N/A <ell src gnome org>
 
- To: commits-list gnome org
 
- Cc: 
 
- Subject: [gimp] app: fix brush offset when shrinking to compensate for blur
 
- Date: Sat,  8 Apr 2017 10:51:06 +0000 (UTC)
 
commit 670be1f880584c1a2772e0178ecdab357edc1047
Author: Ell <ell_se yahoo com>
Date:   Sat Apr 8 06:47:38 2017 -0400
    app: fix brush offset when shrinking to compensate for blur
 app/core/gimpbrush-transform.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/app/core/gimpbrush-transform.c b/app/core/gimpbrush-transform.c
index 8f0103f..cdfc0a1 100644
--- a/app/core/gimpbrush-transform.c
+++ b/app/core/gimpbrush-transform.c
@@ -932,7 +932,6 @@ gimp_brush_transform_adjust_hardness_matrix (gdouble      width,
                                              gdouble      blur_radius,
                                              GimpMatrix3 *matrix)
 {
-
   gdouble scale;
 
   if (blur_radius == 0.0)
@@ -941,5 +940,7 @@ gimp_brush_transform_adjust_hardness_matrix (gdouble      width,
   scale = (MIN (width, height) - 2.0 * blur_radius) / MIN (width, height);
 
   gimp_matrix3_scale (matrix, scale, scale);
-  gimp_matrix3_translate (matrix, blur_radius, blur_radius);
+  gimp_matrix3_translate (matrix,
+                          (1.0 - scale) * width  / 2.0,
+                          (1.0 - scale) * height / 2.0);
 }
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]