Summary: | PDF export stroke color wrong for black lines | ||
---|---|---|---|
Product: | cairo | Reporter: | Johan Engelen <goejendaagh> |
Component: | pdf backend | Assignee: | Adrian Johnson <ajohnson> |
Status: | RESOLVED FIXED | QA Contact: | cairo-bugs mailing list <cairo-bugs> |
Severity: | normal | ||
Priority: | medium | ||
Version: | 1.10.1 | ||
Hardware: | x86 (IA32) | ||
OS: | All | ||
Whiteboard: | |||
i915 platform: | i915 features: | ||
Attachments: |
Test case, showing the bug.
Batch file to build the testcase with Inkscape's devlibs. |
Description
Johan Engelen
2010-10-26 12:15:20 UTC
Forgot to say: Thanks for any comments! -Johan Could you provide a C test case reproducing the issue? It would help to exclude that the problem is in how inkscape uses cairo and it could also be added to the test suite. I was afraid someone would ask for C test case.. :( Created attachment 39794 [details]
Test case, showing the bug.
Here code that reproduces the bug. Confirming it is not an Inkscape bug, but Cairo. (or bad use of cairo?)
Created attachment 39795 [details]
Batch file to build the testcase with Inkscape's devlibs.
Fixed with this commit http://cgit.freedesktop.org/cairo/commit/?id=e23bcfd4300870034f07b1ecd1bb4d2ac95d9785 As an optimisation cairo remembers the currently selected color to avoid emitting the set color operator before each drawing operation if the color is the same as the previous drawing operation. The problem here is cairo remembers the set black used for the 2nd stroke however the 2nd stroke and fill occurs inside a save/restore pair. After the restore the current pdf color reverts to the yellow of the first stroke. Fixed by making cairo emit the set color operator after a restore operator. Thanks for the fix, so this will be fixed in 1.11 ? It has been fixed in the git master and 1.10 branch so it will appear in the 1.10.2 (stable) and 1.11.2 (development snapshot) releases. |
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.