summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authoraavit <eirik.aavitsland@digia.com>2014-08-12 11:54:17 (GMT)
committeraavit <eirik.aavitsland@digia.com>2014-08-29 09:30:24 (GMT)
commit6c3b032693acf86a894a8ea3a30c937a1d08ed7f (patch)
tree22b7db599b346d92e9dd7ac98c77f518d9bd441b /src/gui
parent5dc8b2bac4657827293cfc870ba49fa87ec96e13 (diff)
downloadQt-6c3b032693acf86a894a8ea3a30c937a1d08ed7f.zip
Qt-6c3b032693acf86a894a8ea3a30c937a1d08ed7f.tar.gz
Qt-6c3b032693acf86a894a8ea3a30c937a1d08ed7f.tar.bz2
Fix QPainter::drawPolyline() painting errors with cosmetic pen
Task-number: QTBUG-31579 Change-Id: I8fd2c03ff9a22e4963bfcbcfe196ae4c61b9e10f Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com> (cherry picked from qtbase/319cbb7597100f3b65792dc6a0ce2885ce6c0e8c) Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/painting/qcosmeticstroker.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/gui/painting/qcosmeticstroker.cpp b/src/gui/painting/qcosmeticstroker.cpp
index 5ca652e..1255a3b 100644
--- a/src/gui/painting/qcosmeticstroker.cpp
+++ b/src/gui/painting/qcosmeticstroker.cpp
@@ -533,8 +533,8 @@ void QCosmeticStroker::drawPath(const QVectorPath &path)
QPointF p = QPointF(points[0], points[1]) * state->matrix;
patternOffset = state->lastPen.dashOffset()*64;
- lastPixel.x = -1;
- lastPixel.y = -1;
+ lastPixel.x = INT_MIN;
+ lastPixel.y = INT_MIN;
bool closed;
const QPainterPath::ElementType *e = subPath(type, end, points, &closed);
@@ -588,8 +588,8 @@ void QCosmeticStroker::drawPath(const QVectorPath &path)
QPointF p = QPointF(points[0], points[1]) * state->matrix;
QPointF movedTo = p;
patternOffset = state->lastPen.dashOffset()*64;
- lastPixel.x = -1;
- lastPixel.y = -1;
+ lastPixel.x = INT_MIN;
+ lastPixel.y = INT_MIN;
const qreal *begin = points;
const qreal *end = points + 2*path.elementCount();