[gimp] app: Fix garbage appearing in 1:1 apect ratio 2 spike generated brushes



commit 54844e8ab83a1e577e2b462ea56fd27e94ff1a62
Author: Alexia Death <alexiadeath gmail com>
Date:   Sun Dec 27 00:27:29 2009 +0200

    app: Fix garbage appearing in 1:1 apect ratio 2 spike generated brushes

 app/core/gimpbrushgenerated.c |   19 ++++++++-----------
 1 files changed, 8 insertions(+), 11 deletions(-)
---
diff --git a/app/core/gimpbrushgenerated.c b/app/core/gimpbrushgenerated.c
index e18b096..e031e67 100644
--- a/app/core/gimpbrushgenerated.c
+++ b/app/core/gimpbrushgenerated.c
@@ -480,20 +480,17 @@ gimp_brush_generated_calc (GimpBrushGenerated      *brush,
           gdouble tx = c * x - s * y;
           gdouble ty = fabs (s * x + c * y);
 
-          if (spikes > 2)
-            {
-              gdouble angle = atan2 (ty, tx);
+          gdouble ang = atan2 (ty, tx);
 
-              while (angle > G_PI / spikes)
-                {
-                  gdouble sx = tx;
-                  gdouble sy = ty;
+          while (ang > G_PI / spikes)
+            {
+              gdouble sx = tx;
+              gdouble sy = ty;
 
-                  tx = cs * sx - ss * sy;
-                  ty = ss * sx + cs * sy;
+              tx = cs * sx - ss * sy;
+              ty = ss * sx + cs * sy;
 
-                  angle -= 2 * G_PI / spikes;
-                }
+              ang -= 2 * G_PI / spikes;
             }
 
           ty *= aspect_ratio;



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