Bug 50598 - images with EXTEND_PAD may get rendered at the wrong position
Summary: images with EXTEND_PAD may get rendered at the wrong position
Status: RESOLVED FIXED
Alias: None
Product: cairo
Classification: Unclassified
Component: pdf backend (show other bugs)
Version: 1.12.2
Hardware: Other All
: medium normal
Assignee: Adrian Johnson
QA Contact: cairo-bugs mailing list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-06-01 13:03 UTC by Benjamin Berg
Modified: 2012-06-02 02:35 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
Patch that fixes the issue, no idea how correct it is ... (546 bytes, text/plain)
2012-06-01 13:03 UTC, Benjamin Berg
Details

Description Benjamin Berg 2012-06-01 13:03:48 UTC
Created attachment 62394 [details]
Patch that fixes the issue, no idea how correct it is ...

When an image rendered using EXTEND_PAD and clipped at the same time it may be rendered at the wrong position.
The specific usecase that happened for me was rendering part of a PDF (scanned document) into a new PDF surface using popplers render() function (not render_for_printing because of bug #44002.

I'll attach a patch that fixes the issue for me. It seems that the offset is set on the created image surface in _cairo_pdf_surface_add_padded_image_surface, however it is then not used inside _cairo_pdf_surface_add_source_surface.
Comment 1 Adrian Johnson 2012-06-02 02:35:44 UTC
I've fixed the bug with a different patch. The problem with using cairo_surface_get_device_offset internally is that images passed to the pdf backend have already had the device offset applied to the pattern matrix. And we don't want to apply the offset twice.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.