[gimp] Bug 600316 - Animated brushes, angle calculation



commit 62c0472ca5eb9c44a0d2f502146cdc1ff13c9bf9
Author: rubikcube <daniel hornung gmx de>
Date:   Sun Nov 1 17:05:56 2009 +0100

    Bug 600316 - Animated brushes, angle calculation
    
    This was just a small bug in the angle->index calculation.

 app/core/gimpbrushpipe.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/app/core/gimpbrushpipe.c b/app/core/gimpbrushpipe.c
index 252c827..eb2e80e 100644
--- a/app/core/gimpbrushpipe.c
+++ b/app/core/gimpbrushpipe.c
@@ -198,7 +198,7 @@ gimp_brush_pipe_select_brush (GimpBrush        *brush,
             angle += 2.0 * G_PI;
           else if (angle > 2.0 * G_PI)
             angle -= 2.0 * G_PI;
-          ix = RINT (angle / (2.0 * G_PI) * pipe->rank[i]);
+          ix = (gint) RINT (angle / (2.0 * G_PI) * pipe->rank[i]) % pipe->rank[i];
           break;
 
         case PIPE_SELECT_VELOCITY:



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