mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2025-12-20 12:50:10 +01:00
recording-surface: Fix offset error
When a recording surface with non-zero origin is saved to a png file, it gets cut off. Fix this by setting a device offset when acquiring the source image.
This commit is contained in:
parent
76aed3a5e3
commit
d07fb41056
1 changed files with 1 additions and 0 deletions
|
|
@ -609,6 +609,7 @@ _cairo_recording_surface_acquire_source_image (void *abstract_surface,
|
||||||
image = _cairo_image_surface_create_with_content (surface->base.content,
|
image = _cairo_image_surface_create_with_content (surface->base.content,
|
||||||
surface->extents.width,
|
surface->extents.width,
|
||||||
surface->extents.height);
|
surface->extents.height);
|
||||||
|
cairo_surface_set_device_offset (image, -surface->extents.x, -surface->extents.y);
|
||||||
if (unlikely (image->status))
|
if (unlikely (image->status))
|
||||||
return image->status;
|
return image->status;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue