[gegl] ripple: implement tileability, thanks to the abyss policy



commit cf2a6b6f021419ae9e078f2a831fb59074a898ee
Author: Michael Murà <batolettre gmail com>
Date:   Thu Jun 28 16:57:47 2012 +0900

    ripple: implement tileability, thanks to the abyss policy

 operations/common/ripple.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/operations/common/ripple.c b/operations/common/ripple.c
index 944a9bd..0279395 100644
--- a/operations/common/ripple.c
+++ b/operations/common/ripple.c
@@ -47,6 +47,9 @@ gegl_chant_register_enum_end (GeglRippleWaveType)
 gegl_chant_enum (wave_type, _("Wave type"), GeglRippleWaveType, gegl_ripple_wave_type,
                  GEGl_RIPPLE_WAVE_TYPE_SINE, _("Type of wave"))
 
+gegl_chant_boolean (tileable, _("Tileable"), FALSE,
+                    _("Retain tilebility"))
+
 #else
 
 #define GEGL_CHANT_TYPE_AREA_FILTER
@@ -98,6 +101,8 @@ process (GeglOperation       *operation,
 
   gint n_pixels = result->width * result->height;
 
+  GeglAbyssPolicy abyss = o->tileable ? GEGL_ABYSS_LOOP : GEGL_ABYSS_NONE;
+
   while (n_pixels--)
     {
       gdouble shift;
@@ -130,7 +135,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]