[Poppler-bugs] [Bug 70684] New: Knockout cairo operator (SOURCE) is lost when nesting transparency groups
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Sun Oct 20 10:34:36 PDT 2013
https://bugs.freedesktop.org/show_bug.cgi?id=70684
Priority: medium
Bug ID: 70684
Assignee: poppler-bugs at lists.freedesktop.org
Summary: Knockout cairo operator (SOURCE) is lost when nesting
transparency groups
Severity: normal
Classification: Unclassified
OS: Linux (All)
Reporter: michael at cadilhac.name
Hardware: x86 (IA32)
Status: NEW
Version: unspecified
Component: cairo backend
Product: poppler
Created attachment 87884
--> https://bugs.freedesktop.org/attachment.cgi?id=87884&action=edit
The offending PDF
IMPORTANT NOTE: for this PDF to be even displayed, one should first fix #70671
(I propose a simple fix therein).
In the attached PDF, the blue line should be displayed when behind the yellow
line. The yellow line is the last element of a knockout transparency group
which includes another group containing the blue line. The transparency of the
yellow line should be based on the original backdrop of the group (i.e., the
empty page).
The problem is caused by the restoration of the graphic state in Gfx::drawForm
(Gfx.cc:4947). It calls CairoOutputDev::restoreState which, instead of letting
cairo restore the current operator, sets it using
CairoOutputDev::updateBlendMode. Hence while the first elements of a knockout
groups are drawn using the right operator, i.e., CAIRO_OPERATOR_SOURCE, after a
nested group appears, the operator is reset (most probably to
CAIRO_OPERATOR_OVER, corresponding to Normal blend mode).
I fixed this in my local repo by moving the call to updateBlendMode from
restoreState to paintTransparencyGroup. I am not sure this is the perfect fix,
but it does work for my test case.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/poppler-bugs/attachments/20131020/e5a21998/attachment.html>
More information about the Poppler-bugs
mailing list