Commit ca734f91 authored by Michael Natterer's avatar Michael Natterer 😴

app: port gimp_paint_core_paste() to gimp_drawable_apply_buffer()

using the new TempBuf-GeglBuffer.
parent ea8eebcd
......@@ -858,7 +858,7 @@ gimp_paint_core_paste (GimpPaintCore *core,
GimpPaintApplicationMode mode)
{
TileManager *alt = NULL;
PixelRegion srcPR;
GeglBuffer *canvas_buffer;
if (core->use_saved_proj)
{
......@@ -918,13 +918,15 @@ gimp_paint_core_paste (GimpPaintCore *core,
}
/* intialize canvas buf source pixel regions */
pixel_region_init_temp_buf (&srcPR, core->canvas_buf,
0, 0,
core->canvas_buf->width,
core->canvas_buf->height);
canvas_buffer =
gimp_temp_buf_create_buffer (core->canvas_buf,
gimp_drawable_get_format_with_alpha (drawable));
/* apply the paint area to the image */
gimp_drawable_apply_region (drawable, &srcPR,
gimp_drawable_apply_buffer (drawable, canvas_buffer,
GIMP_GEGL_RECT (0, 0,
core->canvas_buf->width,
core->canvas_buf->height),
FALSE, NULL,
image_opacity, paint_mode,
alt, /* specify an alternative src1 */
......@@ -932,6 +934,8 @@ gimp_paint_core_paste (GimpPaintCore *core,
core->canvas_buf->x,
core->canvas_buf->y);
g_object_unref (canvas_buffer);
/* Update the undo extents */
core->x1 = MIN (core->x1, core->canvas_buf->x);
core->y1 = MIN (core->y1, core->canvas_buf->y);
......
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