[cairo-commit] 2 commits - src/cairo-recording-surface.c

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Feb 3 23:52:59 UTC 2021

 src/cairo-recording-surface.c |    1 +
 1 file changed, 1 insertion(+)

New commits:
commit b29d0f3d582bbafdbac1bb0b21de3994296aedf6
Merge: 48194cf09 d07fb4105
Author: Heiko Lewin <hlewin at gmx.de>
Date:   Wed Feb 3 23:52:56 2021 +0000

    Merge branch 'fix-recording-to-png' into 'master'
    recording-surface: Fix offset error
    See merge request cairo/cairo!118

commit d07fb4105684235dfbed8e1f9499f41a762967f6
Author: Matthias Clasen <mclasen at redhat.com>
Date:   Sat Jan 30 17:57:14 2021 -0500

    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

diff --git a/src/cairo-recording-surface.c b/src/cairo-recording-surface.c
index a65f84e45..71a44798f 100644
--- a/src/cairo-recording-surface.c
+++ b/src/cairo-recording-surface.c
@@ -609,6 +609,7 @@ _cairo_recording_surface_acquire_source_image (void			 *abstract_surface,
     image = _cairo_image_surface_create_with_content (surface->base.content,
+    cairo_surface_set_device_offset (image, -surface->extents.x, -surface->extents.y);
     if (unlikely (image->status))
 	return image->status;

More information about the cairo-commit mailing list