[gegl/soc-2011-warp] warp: balance a bit the different behaviors



commit 2bfd2fd9c5bef37a36f90c205304c64a34d3604e
Author: Michael Murà <batolettre gmail com>
Date:   Wed Aug 3 02:50:17 2011 +0200

    warp: balance a bit the different behaviors

 operations/workshop/warp.c |   16 ++++++++--------
 1 files changed, 8 insertions(+), 8 deletions(-)
---
diff --git a/operations/workshop/warp.c b/operations/workshop/warp.c
index 876e180..9ff8d73 100644
--- a/operations/workshop/warp.c
+++ b/operations/workshop/warp.c
@@ -267,20 +267,20 @@ stamp (GeglChantO          *o,
                 coords[1] += influence * (priv->last_y - y);
                 break;
               case GEGL_WARP_BEHAVIOR_GROW:
-                coords[0] -= influence * (x_iter - x) / o->size;
-                coords[1] -= influence * (y_iter - y) / o->size;
+                coords[0] -= 2.0 * influence * (x_iter - x) / o->size;
+                coords[1] -= 2.0 * influence * (y_iter - y) / o->size;
                 break;
               case GEGL_WARP_BEHAVIOR_SHRINK:
-                coords[0] += influence * (x_iter - x) / o->size;
-                coords[1] += influence * (y_iter - y) / o->size;
+                coords[0] += 2.0 * influence * (x_iter - x) / o->size;
+                coords[1] += 2.0 * influence * (y_iter - y) / o->size;
                 break;
               case GEGL_WARP_BEHAVIOR_SWIRL_CW:
-                coords[0] += influence * (y_iter - y) / o->size;
-                coords[1] -= influence * (x_iter - x) / o->size;
+                coords[0] += 3.0 * influence * (y_iter - y) / o->size;
+                coords[1] -= 5.0 * influence * (x_iter - x) / o->size;
                 break;
               case GEGL_WARP_BEHAVIOR_SWIRL_CCW:
-                coords[0] -= influence * (y_iter - y) / o->size;
-                coords[1] += influence * (x_iter - x) / o->size;
+                coords[0] -= 3.0 * influence * (y_iter - y) / o->size;
+                coords[1] += 5.0 * influence * (x_iter - x) / o->size;
                 break;
               case GEGL_WARP_BEHAVIOR_ERASE:
                 coords[0] *= 1.0 - MIN (influence, 1.0);



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