[gegl] map-absolute: use new iterator api
- From: Øyvind "pippin" Kolås <ok src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gegl] map-absolute: use new iterator api
- Date: Wed, 12 Sep 2018 11:55:33 +0000 (UTC)
commit 005a2a442d8d42fdf09f58f8d06200e4760770ea
Author: Øyvind Kolås <pippin gimp org>
Date: Mon Sep 10 22:36:23 2018 +0200
map-absolute: use new iterator api
operations/common/map-absolute.c | 18 ++++++++++--------
1 file changed, 10 insertions(+), 8 deletions(-)
---
diff --git a/operations/common/map-absolute.c b/operations/common/map-absolute.c
index 9b714c154..144b01dd8 100644
--- a/operations/common/map-absolute.c
+++ b/operations/common/map-absolute.c
@@ -17,6 +17,7 @@
*
*/
+#define GEGL_ITERATOR2_API
#ifdef GEGL_PROPERTIES
property_enum (sampler_type, _("Resampling method"),
@@ -83,7 +84,7 @@ process (GeglOperation *operation,
if (aux != NULL)
{
it = gegl_buffer_iterator_new (output, result, level, format_io,
- GEGL_ACCESS_WRITE, GEGL_ABYSS_NONE);
+ GEGL_ACCESS_WRITE, GEGL_ABYSS_NONE, 3);
index_out = 0;
index_coords = gegl_buffer_iterator_add (it, aux, result, level, format_coords,
@@ -97,17 +98,18 @@ process (GeglOperation *operation,
gint h;
gfloat x;
gfloat y;
- gfloat *in = it->data[index_in];
- gfloat *out = it->data[index_out];
- gfloat *coords = it->data[index_coords];
+ gfloat *in = it->items[index_in].data;
+ gfloat *out = it->items[index_out].data;
+ gfloat *coords = it->items[index_coords].data;
+ GeglRectangle *roi = &it->items[0].roi;
- y = it->roi->y + 0.5; /* initial y coordinate */
+ y = roi->y + 0.5; /* initial y coordinate */
- for (h = it->roi->height; h; h--, y++)
+ for (h = roi->height; h; h--, y++)
{
- x = it->roi->x + 0.5; /* initial x coordinate */
+ x = roi->x + 0.5; /* initial x coordinate */
- for (w = it->roi->width; w; w--, x++)
+ for (w = roi->width; w; w--, x++)
{
/* if the coordinate asked is an exact pixel, we fetch it
* directly, to avoid the blur of sampling */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]