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>
This commit is contained in:
parent
2f66ea3d69
commit
05d5268502
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user