[gegl] noise-pick: use new iterator api



commit 581afb02ccce5e8279f323cba61abd96077316b5
Author: Øyvind Kolås <pippin gimp org>
Date:   Mon Sep 10 22:36:23 2018 +0200

    noise-pick: use new iterator api

 operations/common/noise-pick.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/operations/common/noise-pick.c b/operations/common/noise-pick.c
index db3db114c..24be73e28 100644
--- a/operations/common/noise-pick.c
+++ b/operations/common/noise-pick.c
@@ -23,6 +23,7 @@
  *     We pick a pixel at random from the neighborhood of the current pixel.
  */
 
+#define GEGL_ITERATOR2_API
 #include "config.h"
 
 #include <glib/gi18n-lib.h>
@@ -88,14 +89,14 @@ process (GeglOperation       *operation,
   bpp = babl_format_get_bytes_per_pixel (format);
 
   gi = gegl_buffer_iterator_new (output, result, 0, format,
-                                 GEGL_ACCESS_WRITE, GEGL_ABYSS_CLAMP);
+                                 GEGL_ACCESS_WRITE, GEGL_ABYSS_CLAMP, 1);
 
   sampler = gegl_buffer_sampler_new_at_level (input, format, GEGL_SAMPLER_NEAREST, level);
 
   while (gegl_buffer_iterator_next (gi))
     {
-      gchar        *data = gi->data[0];
-      GeglRectangle roi  = gi->roi[0];
+      gchar        *data = gi->items[0].data;
+      GeglRectangle roi  = gi->items[0].roi;
       gint          i, j;
 
       for (j = roi.y; j < roi.y + roi.height ; j++)


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