[gegl/abyss] waves: allow to clamp deformation in the image area



commit c2f86d77c0a83c5f155d9fbc1733a0bdbfcf593e
Author: Michael Murà <batolettre gmail com>
Date:   Thu Jun 28 17:23:39 2012 +0900

    waves: allow to clamp deformation in the image area

 operations/common/waves.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/operations/common/waves.c b/operations/common/waves.c
index 8f8424f..d9cd691 100644
--- a/operations/common/waves.c
+++ b/operations/common/waves.c
@@ -41,6 +41,8 @@ gegl_chant_double (phi, _("Phase shift"), -1.0, 1.0, 0.0,
 gegl_chant_enum (sampler_type, _("Sampler"), GeglSamplerType, gegl_sampler_type,
                  GEGL_SAMPLER_CUBIC, _("Sampler used internally"))
 
+gegl_chant_boolean (clamp, _("Clamp deformation"), FALSE,
+                    _("Limit deformation in the image area."))
 
 #else
 
@@ -92,6 +94,8 @@ process (GeglOperation       *operation,
 
   gint n_pixels = result->width * result->height;
 
+  GeglAbyssPolicy abyss = o->clamp ? GEGL_ABYSS_CLAMP : GEGL_ABYSS_NONE;
+
   while (n_pixels--)
     {
       gdouble coordsx = 0.0;
@@ -125,7 +129,7 @@ process (GeglOperation       *operation,
                         coordsy,
                         NULL,
                         out_pixel,
-                        GEGL_ABYSS_NONE);
+                        abyss);
 
       out_pixel += 4;
 



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