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



commit c5b4643d6932bcc31b374b43f9695b7195d10e07
Author: Alexia Death <alexiadeath gmail com>
Date:   Wed Dec 30 13:21:26 2009 +0200

    Revert "app: Fix garbage appearing in 1:1 apect ratio 2 spike generated brushes"
    
    This reverts commit 54844e8ab83a1e577e2b462ea56fd27e94ff1a62.
    An unneded pseudofix. Proper fix will be commited soon.

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



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