[gegl] ripple: use new iterator api



commit 5f19191c55bf5cd2ef146f51e1784e2eb1cbcf2e
Author: Øyvind Kolås <pippin gimp org>
Date:   Mon Sep 10 16:49:05 2018 +0200

    ripple: use new iterator api

 operations/common-gpl3+/ripple.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)
---
diff --git a/operations/common-gpl3+/ripple.c b/operations/common-gpl3+/ripple.c
index 92b6ea135..0e3c7abdf 100644
--- a/operations/common-gpl3+/ripple.c
+++ b/operations/common-gpl3+/ripple.c
@@ -20,6 +20,7 @@
  * Copyright 1997 Brian Degenhardt <bdegenha ucsd edu>
  */
 
+#define GEGL_ITERATOR2_API
 #include "config.h"
 #include <glib/gi18n-lib.h>
 
@@ -180,16 +181,16 @@ process (GeglOperation       *operation,
     }
 
   iter = gegl_buffer_iterator_new (output, result, 0, format,
-                                   GEGL_ACCESS_WRITE, GEGL_ABYSS_NONE);
+                                   GEGL_ACCESS_WRITE, GEGL_ABYSS_NONE, 1);
 
   while (gegl_buffer_iterator_next (iter))
     {
       gint x = result->x;
       gint y = result->y;
-      gfloat *out_pixel = iter->data[0];
+      gfloat *out_pixel = iter->items[0].data;
 
-      for (y = iter->roi[0].y; y < iter->roi[0].y + iter->roi[0].height; ++y)
-        for (x = iter->roi[0].x; x < iter->roi[0].x + iter->roi[0].width; ++x)
+      for (y = iter->items[0].roi.y; y < iter->items[0].roi.y + iter->items[0].roi.height; ++y)
+        for (x = iter->items[0].roi.x; x < iter->items[0].roi.x + iter->items[0].roi.width; ++x)
           {
             gdouble shift;
             gdouble coordsx;


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