Summary: | Device offset is not affected by scaling | ||
---|---|---|---|
Product: | cairo | Reporter: | Michael Ventnor <ventnor.bugzilla> |
Component: | general | Assignee: | Jeff Muizelaar <jmuizelaar> |
Status: | RESOLVED FIXED | QA Contact: | cairo-bugs mailing list <cairo-bugs> |
Severity: | normal | ||
Priority: | medium | ||
Version: | 1.6.5 | ||
Hardware: | Other | ||
OS: | All | ||
Whiteboard: | |||
i915 platform: | i915 features: | ||
Attachments: |
Testcase
Apply the device offset before the destination transform cairo test for device offset with scale New patch |
Description
Michael Ventnor
2008-06-22 18:55:06 UTC
Created attachment 17310 [details]
Testcase
When compiled, this dumps the contents of an image surface to stdout. The result should be that the orange rectangle (on the device offset surface) completely covers the blue rectangle (the reference that is drawn directly on the scaled surface).
You are right. This is a bug. In the mean time you can avoid it by not using device offsets for this purpose. Use the pattern matrix instead. If you want to jump into fixing this, _cairo_pattern_acquire_surface_for_surface() is the place. Created attachment 17737 [details] [review] Apply the device offset before the destination transform The attached patch seems to fix the problem. From reading the code, that patch looks right to me -- we presumably never ran into this because the device transform of things used as sources was always identity. I'd push this patch upstream, and add a testcase to the test suite for src-with-dev-transform. Created attachment 17797 [details] [review] cairo test for device offset with scale Created attachment 17798 [details] [review] New patch Tests passed for me -- Jeff, can you commit and push this? I'll pull it into Mozilla from there. Committed. |
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.