summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorEirik Aavitsland <eirik.aavitsland@qt.io>2019-12-17 13:13:16 +0100
committerEirik Aavitsland <eirik.aavitsland@qt.io>2019-12-17 14:04:05 +0100
commit05d52685028a46e340d610093c7e7c98479ac18b (patch)
tree66be1365a2e17c9c0501db4dcd98b977f55360a2 /src/gui
parent2f66ea3d69800f9ea82e215d96a064ce40b1bdae (diff)
Fix QPainter::drawLines() with cosmetic pen
Even though each line in the array passed to drawLines() should be rendered as an independent line, some state was kept in the cosmetic stroker from one line to the next. This could result in visible rendering errors. Fixes: QTBUG-80834 Change-Id: Ief7bf78eab83ae34459802bff5a57d6beec4a5e5 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/painting/qcosmeticstroker.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/gui/painting/qcosmeticstroker.cpp b/src/gui/painting/qcosmeticstroker.cpp
index 0fb89a75b5..fa34c5598e 100644
--- a/src/gui/painting/qcosmeticstroker.cpp
+++ b/src/gui/painting/qcosmeticstroker.cpp
@@ -375,6 +375,7 @@ void QCosmeticStroker::drawLine(const QPointF &p1, const QPointF &p2)
patternOffset = state->lastPen.dashOffset()*64;
lastPixel.x = INT_MIN;
+ lastPixel.y = INT_MIN;
stroke(this, start.x(), start.y(), end.x(), end.y(), drawCaps ? CapBegin|CapEnd : 0);