[gimp/gimp-2-10] 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/gimp-2-10] plug-ins: migrate pagecurl to new iterator api
- Date: Tue, 18 Sep 2018 10:39:36 +0000 (UTC)
commit ef035fb297879efed7475d8ba200fb5f7c2416b2
Author: Øyvind Kolås <pippin gimp org>
Date: Tue Sep 11 02:05:41 2018 +0200
plug-ins: migrate pagecurl to new iterator api
(cherry picked from commit 6fca9959c7376ee58ccd5c7be8f0d9d69551c912)
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 8242d6d6fc..282cdfbd58 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>
@@ -742,7 +742,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);
@@ -774,8 +774,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++)
{
@@ -909,16 +909,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]