Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.11.0
-
Linux/X11 OpenSuse
-
b72a9cbaaf7d49a1813c3b1926a68e05f47f350a
Description
The PDF backend ignores the cosmetic attributes for certain pens.
The attribute indicating, if a pen is cosmetic or not gets stored in QPdf::Stroker ( see qpdf.cpp line 655 ). But later in QPdfEngine::drawPath the stroker is not used, when the pen is regarded as "simple".
According to qpdf.cpp line 1113 a pen is "simple", when the following conditions are met:
(penBrush.style() == Qt::SolidPattern) && penBrush.isOpaque() && d->opacity == 1.0
According to the code it is possible to get the cosmetic attribute being respected by setting the penBrush to something non opaque. And indeed setting a pen color with an alpha value of 254 worked in our tests.
This bug also appears in earlier versions, maybe since the code was implemented.
Attachments
For Gerrit Dashboard: QTBUG-68537 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
231694,2 | Fix PDF rendering of strokes with cosmetic pens | dev | qt/qtbase | Status: MERGED | +2 | 0 |