Bug 22441

Summary: Unexpected shift with push_group and pop_group
Product: cairo Reporter: Stefan Röllin <stefan.roellin>
Component: pdf backendAssignee: Adrian Johnson <ajohnson>
Status: RESOLVED MOVED QA Contact: cairo-bugs mailing list <cairo-bugs>
Severity: normal    
Priority: medium    
Version: 1.8.6   
Hardware: x86 (IA32)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments: Program to verify bug

Description Stefan Röllin 2009-06-23 11:27:35 UTC
A problem with the pdf cairo backend was found in inkscape, see bug https://bugs.launchpad.net/inkscape/+bug/320646

The attached program reproduces this behaviour. It does basically the following:

    draw a circle
    cairo_push_group
    draw another circle at same place as first
    cairo_pop_group_to_source
    cairo_paint_with_alpha

One would expect that both circles are shown at the same place, which is not the case. It depends on the page size, whether the second circle is at the correct position or not.
Comment 1 Stefan Röllin 2009-06-23 11:39:01 UTC
Created attachment 27055 [details]
Program to verify bug
Comment 2 Chris Wilson 2009-07-04 04:08:55 UTC
Just an update: the error is a non-trivial rounding of surface sizes when mixing the device-transform and cairo-to-pdf matrices. My thoughts towards a solution lie both along improving the internal interfaces to communicate non-integer extents (though, those extents tend only to be related to rasterisation/pixels anyway...) and converting pdf to setup its device-transform more appropriately (which doesn't immediately address this issue, but might be a step towards a fix).

I've added cairo/test/group-unaligned.c to capture this bug. Thanks.
Comment 3 GitLab Migration User 2018-08-25 13:34:34 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/cairo/cairo/issues/77.

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.