summaryrefslogtreecommitdiffstats
path: root/src/gui/painting/qpaintengineex.cpp
diff options
context:
space:
mode:
authorEirik Aavitsland <eirik.aavitsland@qt.io>2018-10-09 16:42:03 +0200
committerEirik Aavitsland <eirik.aavitsland@qt.io>2018-11-09 08:41:33 +0000
commit7a4ebf1b714956c7a8b676d83ea8461b2cdc0db3 (patch)
tree1d420d49aa726a968f6222e1e66aea8bc8a153e2 /src/gui/painting/qpaintengineex.cpp
parent757d4b85a91643c289d3224082b48b4835868104 (diff)
Painting: Fix capping of polylines having endpoint == startpoint
A polyline should not be closed like a polygon, even if the start and end points are identical. But when the primitive was broken down to a vector path, the stroker no longer had available the information that it should be open, and so would join the start and end points. Fixes: QTBUG-65393 Change-Id: I0a566f91cf1a2843fda662b393dbae78c3c38f06 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/gui/painting/qpaintengineex.cpp')
-rw-r--r--src/gui/painting/qpaintengineex.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gui/painting/qpaintengineex.cpp b/src/gui/painting/qpaintengineex.cpp
index 9f07af92e4..81ce5c60c5 100644
--- a/src/gui/painting/qpaintengineex.cpp
+++ b/src/gui/painting/qpaintengineex.cpp
@@ -439,6 +439,9 @@ void QPaintEngineEx::stroke(const QVectorPath &path, const QPen &pen)
}
}
+ if (d->activeStroker == &d->stroker)
+ d->stroker.setForceOpen(path.hasExplicitOpen());
+
const QPainterPath::ElementType *types = path.elements();
const qreal *points = path.points();
int pointCount = path.elementCount();