Commit fcf113a3 authored by Øyvind "pippin" Kolås's avatar Øyvind "pippin" Kolås

app: migrate gegl-mask-combine to new iterator api

parent 567ffe94
...@@ -20,6 +20,7 @@ ...@@ -20,6 +20,7 @@
#include <string.h> #include <string.h>
#include <gio/gio.h> #include <gio/gio.h>
#define GEGL_ITERATOR2_API
#include <gegl.h> #include <gegl.h>
#include "libgimpbase/gimpbase.h" #include "libgimpbase/gimpbase.h"
...@@ -205,12 +206,12 @@ gimp_gegl_mask_combine_ellipse_rect (GeglBuffer *mask, ...@@ -205,12 +206,12 @@ gimp_gegl_mask_combine_ellipse_rect (GeglBuffer *mask,
iter = gegl_buffer_iterator_new (mask, iter = gegl_buffer_iterator_new (mask,
GEGL_RECTANGLE (x0, y0, width, height), 0, GEGL_RECTANGLE (x0, y0, width, height), 0,
babl_format ("Y float"), babl_format ("Y float"),
GEGL_ACCESS_READWRITE, GEGL_ABYSS_NONE); GEGL_ACCESS_READWRITE, GEGL_ABYSS_NONE, 1);
roi = &iter->roi[0]; roi = &iter->items[0].roi;
while (gegl_buffer_iterator_next (iter)) while (gegl_buffer_iterator_next (iter))
{ {
gfloat *data = iter->data[0]; gfloat *data = iter->items[0].data;
gint py; gint py;
for (py = roi->y; for (py = roi->y;
...@@ -411,7 +412,7 @@ gimp_gegl_mask_combine_buffer (GeglBuffer *mask, ...@@ -411,7 +412,7 @@ gimp_gegl_mask_combine_buffer (GeglBuffer *mask,
iter = gegl_buffer_iterator_new (mask, &rect, 0, iter = gegl_buffer_iterator_new (mask, &rect, 0,
mask_format, mask_format,
GEGL_ACCESS_READWRITE, GEGL_ABYSS_NONE); GEGL_ACCESS_READWRITE, GEGL_ABYSS_NONE, 2);
rect.x -= off_x; rect.x -= off_x;
rect.y -= off_y; rect.y -= off_y;
...@@ -443,8 +444,8 @@ gimp_gegl_mask_combine_buffer (GeglBuffer *mask, ...@@ -443,8 +444,8 @@ gimp_gegl_mask_combine_buffer (GeglBuffer *mask,
case GIMP_CHANNEL_OP_REPLACE: case GIMP_CHANNEL_OP_REPLACE:
while (gegl_buffer_iterator_next (iter)) while (gegl_buffer_iterator_next (iter))
{ {
gfloat *mask_data = iter->data[0]; gfloat *mask_data = iter->items[0].data;
const gfloat *add_on_data = iter->data[1]; const gfloat *add_on_data = iter->items[1].data;
gint count = iter->length; gint count = iter->length;
while (count--) while (count--)
...@@ -462,8 +463,8 @@ gimp_gegl_mask_combine_buffer (GeglBuffer *mask, ...@@ -462,8 +463,8 @@ gimp_gegl_mask_combine_buffer (GeglBuffer *mask,
case GIMP_CHANNEL_OP_SUBTRACT: case GIMP_CHANNEL_OP_SUBTRACT:
while (gegl_buffer_iterator_next (iter)) while (gegl_buffer_iterator_next (iter))
{ {
gfloat *mask_data = iter->data[0]; gfloat *mask_data = iter->items[0].data;
const gfloat *add_on_data = iter->data[1]; const gfloat *add_on_data = iter->items[1].data;
gint count = iter->length; gint count = iter->length;
while (count--) while (count--)
...@@ -482,8 +483,8 @@ gimp_gegl_mask_combine_buffer (GeglBuffer *mask, ...@@ -482,8 +483,8 @@ gimp_gegl_mask_combine_buffer (GeglBuffer *mask,
case GIMP_CHANNEL_OP_INTERSECT: case GIMP_CHANNEL_OP_INTERSECT:
while (gegl_buffer_iterator_next (iter)) while (gegl_buffer_iterator_next (iter))
{ {
gfloat *mask_data = iter->data[0]; gfloat *mask_data = iter->items[0].data;
const gfloat *add_on_data = iter->data[1]; const gfloat *add_on_data = iter->items[1].data;
gint count = iter->length; gint count = iter->length;
while (count--) while (count--)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment