diff options
author | Allan Sandfeld Jensen <allan.jensen@digia.com> | 2014-03-28 12:56:39 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-03-29 10:39:11 +0100 |
commit | f2e6570e4f31cbf565aa2849ccc12692c6201bd5 (patch) | |
tree | 9fe6805792c3d0a531b92c4782626f235e0b2c8c /src/gui | |
parent | 8cde2faebccbea15c7e0c4df31402e6d3ce6a23f (diff) |
Fix drawing paths with constant opacity onto PDF
The native PDF strokes can not be used with constant opacity as any
overlapping parts of the path will end up being drawn multiple times
getting the wrong final opacity. A constant opacity should therefore
be treated the same as opacity on the pen color, and trigger the
fallback drawing.
Task-number: QTBUG-37101
Change-Id: I44f70a8b494567ee89804a5fa6333304a5abe91e
Reviewed-by: Michael Bruning <michael.bruning@digia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/painting/qpdf.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/painting/qpdf.cpp b/src/gui/painting/qpdf.cpp index 56cfc0f707..bda5df3d13 100644 --- a/src/gui/painting/qpdf.cpp +++ b/src/gui/painting/qpdf.cpp @@ -1059,7 +1059,7 @@ void QPdfEngine::drawPath (const QPainterPath &p) if (!d->hasPen && !d->hasBrush) return; - if (d->simplePen) { + if (d->simplePen && d->opacity == 1.0) { // draw strokes natively in this case for better output *d->currentPage << QPdf::generatePath(p, QTransform(), d->hasBrush ? QPdf::FillAndStrokePath : QPdf::StrokePath); } else { |