[gegl/soc-2011-warp] warp: compute the stamp curve without the strength factor



commit 38fc5f9b7c3e7df8d1e7862b0a314dc88ac31975
Author: Michael Murà <batolettre gmail com>
Date:   Tue Aug 2 21:42:32 2011 +0200

    warp: compute the stamp curve without the strength factor

 operations/workshop/warp.c |   14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)
---
diff --git a/operations/workshop/warp.c b/operations/workshop/warp.c
index 651d186..bcbee57 100644
--- a/operations/workshop/warp.c
+++ b/operations/workshop/warp.c
@@ -160,9 +160,9 @@ calc_lut (GeglChantO  *o)
 }
 
 static gdouble
-get_influence (GeglChantO *o,
-               gdouble     x,
-               gdouble     y)
+get_stamp_force (GeglChantO *o,
+                 gdouble     x,
+                 gdouble     y)
 {
   WarpPrivate  *priv = (WarpPrivate*) o->chant_data;
   gfloat        radius;
@@ -175,7 +175,7 @@ get_influence (GeglChantO *o,
   radius = sqrt(x*x+y*y);
 
   if (radius < 0.5 * o->size + 1)
-    return o->strength * priv->lookup[(gint) RINT (radius)];
+    return priv->lookup[(gint) RINT (radius)];
   else
     return 0.0;
 }
@@ -250,9 +250,9 @@ stamp (GeglChantO          *o,
 
       while (n_pixels--)
         {
-          influence = get_influence (o,
-                                     x_iter - x,
-                                     y_iter - y);
+          influence = o->strength * get_stamp_force (o,
+                                                     x_iter - x,
+                                                     y_iter - y);
 
           switch (o->behavior)
             {



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