static void render_blob (GimpBlob *blob, PixelRegion *dest) { gpointer pr; for (pr = pixel_regions_register (1, dest); pr != NULL; pr = pixel_regions_process (pr)) { guchar *d = dest->data; gint h = dest->h; gint y; for (y = 0; y < h; y++, d += dest->rowstride) { render_blob_line (blob, d, dest->x, dest->y + y, dest->w); } } }
static void render_blob (GeglBuffer *buffer, GeglRectangle *rect, GimpBlob *blob) { GeglBufferIterator *iter; GeglRectangle *roi; iter = gegl_buffer_iterator_new (buffer, rect, 0, babl_format ("Y u8"), GEGL_BUFFER_READWRITE, GEGL_ABYSS_NONE); roi = &iter->roi[0]; while (gegl_buffer_iterator_next (iter)) { guchar *d = iter->data[0]; gint h = roi->height; gint y; for (y = 0; y < h; y++, d += roi->width * 1) { render_blob_line (blob, d, roi->x, roi->y + y, roi->width); } } }