[gimp] plug-ins: migrate pagecurl to new iterator api
- From: Øyvind "pippin" Kolås <ok src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] plug-ins: migrate pagecurl to new iterator api
- Date: Wed, 12 Sep 2018 11:55:28 +0000 (UTC)
commit 6fca9959c7376ee58ccd5c7be8f0d9d69551c912
Author: Øyvind Kolås <pippin gimp org>
Date: Tue Sep 11 02:05:41 2018 +0200
plug-ins: migrate pagecurl to new iterator api
plug-ins/pagecurl/pagecurl.c | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
---
diff --git a/plug-ins/pagecurl/pagecurl.c b/plug-ins/pagecurl/pagecurl.c
index 1f6655c695..40442565c0 100644
--- a/plug-ins/pagecurl/pagecurl.c
+++ b/plug-ins/pagecurl/pagecurl.c
@@ -39,7 +39,7 @@
* 1.0: (July '04)
* - Code cleanup, added reverse gradient option.
*/
-
+#define GEGL_ITERATOR2_API
#include "config.h"
#include <libgimp/gimp.h>
@@ -738,7 +738,7 @@ do_curl_effect (gint32 drawable_id)
iter = gegl_buffer_iterator_new (curl_buffer,
GEGL_RECTANGLE (0, 0, width, height), 0,
format,
- GEGL_ACCESS_WRITE, GEGL_ABYSS_NONE);
+ GEGL_ACCESS_WRITE, GEGL_ABYSS_NONE, 1);
/* Init shade_under */
gimp_vector2_set (&dl, -sel_width, -sel_height);
@@ -770,8 +770,8 @@ do_curl_effect (gint32 drawable_id)
{
gfloat *dest;
- roi = &iter->roi[0];
- dest = (gfloat *) iter->data[0];
+ roi = &iter->items[0].roi;
+ dest = (gfloat *) iter->items[0].data;
for (y1 = roi->y; y1 < roi->y + roi->height; y1++)
{
@@ -905,16 +905,16 @@ clear_curled_region (gint32 drawable_id)
iter = gegl_buffer_iterator_new (shadow_buf,
GEGL_RECTANGLE (0, 0, width, height), 0,
format,
- GEGL_ACCESS_WRITE, GEGL_ABYSS_NONE);
+ GEGL_ACCESS_WRITE, GEGL_ABYSS_NONE, 2);
buf_index = gegl_buffer_iterator_add (iter, buf, NULL, 0,
format,
GEGL_ACCESS_READ, GEGL_ABYSS_NONE);
while (gegl_buffer_iterator_next (iter))
{
- roi = &iter->roi[0];
- dest = iter->data[0];
- src = iter->data[buf_index];
+ roi = &iter->items[0].roi;
+ dest = iter->items[0].data;
+ src = iter->items[buf_index].data;
memcpy (dest, src, roi->width * roi->height * bpp);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]