[gegl] common/warp: do not factor stamp size into the the influence - bigger brushes will do nothing



commit 41ec5b6d5029430e34f3348a2098aaf1606433a2
Author: Alexia Death <alexiadeath gmail com>
Date:   Mon Feb 17 20:38:54 2014 +0200

    common/warp: do not factor stamp size into the the influence - bigger brushes will do nothing

 operations/common/warp.c |   16 ++++++++--------
 1 files changed, 8 insertions(+), 8 deletions(-)
---
diff --git a/operations/common/warp.c b/operations/common/warp.c
index d1ff0d9..de1949d 100644
--- a/operations/common/warp.c
+++ b/operations/common/warp.c
@@ -292,20 +292,20 @@ stamp (GeglChantO          *o,
                 coords[1] += influence * (priv->last_y - y);
                 break;
               case GEGL_WARP_BEHAVIOR_GROW:
-                coords[0] -= 2.0 * influence * (x_iter - x) / o->size;
-                coords[1] -= 2.0 * influence * (y_iter - y) / o->size;
+                coords[0] -= influence * 0.1 * (x_iter - x);
+                coords[1] -= influence * 0.1 * (y_iter - y);
                 break;
               case GEGL_WARP_BEHAVIOR_SHRINK:
-                coords[0] += 2.0 * influence * (x_iter - x) / o->size;
-                coords[1] += 2.0 * influence * (y_iter - y) / o->size;
+                coords[0] += influence * 0.1 * (x_iter - x);
+                coords[1] += influence * 0.1 * (y_iter - y);
                 break;
               case GEGL_WARP_BEHAVIOR_SWIRL_CW:
-                coords[0] += 3.0 * influence * (y_iter - y) / o->size;
-                coords[1] -= 5.0 * influence * (x_iter - x) / o->size;
+                coords[0] += 3.0 * influence * 0.1 * (y_iter - y);
+                coords[1] -= 5.0 * influence * 0.1 * (x_iter - x);
                 break;
               case GEGL_WARP_BEHAVIOR_SWIRL_CCW:
-                coords[0] -= 3.0 * influence * (y_iter - y) / o->size;
-                coords[1] += 5.0 * influence * (x_iter - x) / o->size;
+                coords[0] -= 3.0 * influence * 0.1 * (y_iter - y);
+                coords[1] += 5.0 * influence * 0.1 * (x_iter - x);
                 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]