From f2e6570e4f31cbf565aa2849ccc12692c6201bd5 Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Fri, 28 Mar 2014 12:56:39 +0100 Subject: 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 Reviewed-by: Gunnar Sletta --- src/gui/painting/qpdf.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/gui/painting') 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 { -- cgit v1.2.3