[gimp/gimp-2-10] plug-ins: border-average migrated to new iterator api



commit 4baf61a2a0a26eaa7199c46d61878e885e589840
Author: Øyvind Kolås <pippin gimp org>
Date:   Tue Sep 11 01:52:18 2018 +0200

    plug-ins: border-average migrated to new iterator api
    
    (cherry picked from commit 754a3c5b18f314349c25a56c6c0421a613cdfc18)

 plug-ins/common/border-average.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/plug-ins/common/border-average.c b/plug-ins/common/border-average.c
index 02bacf0ab9..71a82ef5e6 100644
--- a/plug-ins/common/border-average.c
+++ b/plug-ins/common/border-average.c
@@ -17,6 +17,7 @@
  * along with this program.  If not, see <https://www.gnu.org/licenses/>.
  */
 
+#define GEGL_ITERATOR2_API
 #include "config.h"
 
 #include <libgimp/gimp.h>
@@ -271,14 +272,14 @@ borderaverage (GeglBuffer   *buffer,
           GeglBufferIterator *gi;
 
           gi = gegl_buffer_iterator_new (buffer, &border[i], 0, babl_format ("R'G'B' u8"),
-                                         GEGL_ACCESS_READWRITE, GEGL_ABYSS_NONE);
+                                         GEGL_ACCESS_READWRITE, GEGL_ABYSS_NONE, 1);
 
           while (gegl_buffer_iterator_next (gi))
             {
               guint   k;
               guchar *data;
 
-              data = (guchar*) gi->data[0];
+              data = (guchar*) gi->items[0].data;
 
               for (k = 0; k < gi->length; k++)
                 {


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