From 05d52685028a46e340d610093c7e7c98479ac18b Mon Sep 17 00:00:00 2001 From: Eirik Aavitsland Date: Tue, 17 Dec 2019 13:13:16 +0100 Subject: 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 --- src/gui/painting/qcosmeticstroker.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'src/gui/painting') 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); -- cgit v1.2.3