[gimp] app: migrate gimpoperationgradient to new iterator api



commit c6d23add6539321b04c21a9787fa9069df67549e
Author: Øyvind Kolås <pippin gimp org>
Date:   Tue Sep 11 01:47:12 2018 +0200

    app: migrate gimpoperationgradient to new iterator api

 app/operations/gimpoperationgradient.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/app/operations/gimpoperationgradient.c b/app/operations/gimpoperationgradient.c
index 889d8f8656..ec3a0164c7 100644
--- a/app/operations/gimpoperationgradient.c
+++ b/app/operations/gimpoperationgradient.c
@@ -23,6 +23,7 @@
 #include "config.h"
 
 #include <cairo.h>
+#define GEGL_ITERATOR2_API
 #include <gegl.h>
 #include <gdk-pixbuf/gdk-pixbuf.h>
 
@@ -1130,15 +1131,15 @@ gimp_operation_gradient_process (GeglOperation       *operation,
 
       iter = gegl_buffer_iterator_new (output, result, 0,
                                        babl_format ("R'G'B'A float"),
-                                       GEGL_ACCESS_WRITE, GEGL_ABYSS_NONE);
-      roi = &iter->roi[0];
+                                       GEGL_ACCESS_WRITE, GEGL_ABYSS_NONE, 1);
+      roi = &iter->items[0].roi;
 
       if (self->dither)
         seed = g_rand_new ();
 
       while (gegl_buffer_iterator_next (iter))
         {
-          gfloat *dest = iter->data[0];
+          gfloat *dest = iter->items[0].data;
           gint    endx = roi->x + roi->width;
           gint    endy = roi->y + roi->height;
           gint    x, y;


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