diff options
author | Eirik Aavitsland <eirik.aavitsland@qt.io> | 2018-10-09 16:42:03 +0200 |
---|---|---|
committer | Eirik Aavitsland <eirik.aavitsland@qt.io> | 2018-11-09 08:41:33 +0000 |
commit | 7a4ebf1b714956c7a8b676d83ea8461b2cdc0db3 (patch) | |
tree | 1d420d49aa726a968f6222e1e66aea8bc8a153e2 /src/gui/painting/qvectorpath_p.h | |
parent | 757d4b85a91643c289d3224082b48b4835868104 (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/qvectorpath_p.h')
-rw-r--r-- | src/gui/painting/qvectorpath_p.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/gui/painting/qvectorpath_p.h b/src/gui/painting/qvectorpath_p.h index d1b08ed423..8580598784 100644 --- a/src/gui/painting/qvectorpath_p.h +++ b/src/gui/painting/qvectorpath_p.h @@ -99,7 +99,8 @@ public: // Shape rendering specifiers... OddEvenFill = 0x1000, WindingFill = 0x2000, - ImplicitClose = 0x4000 + ImplicitClose = 0x4000, + ExplicitOpen = 0x8000 }; // ### Falcon: introduca a struct XY for points so lars is not so confused... @@ -124,6 +125,7 @@ public: inline bool isCacheable() const { return m_hints & ShouldUseCacheHint; } inline bool hasImplicitClose() const { return m_hints & ImplicitClose; } + inline bool hasExplicitOpen() const { return m_hints & ExplicitOpen; } inline bool hasWindingFill() const { return m_hints & WindingFill; } inline void makeCacheable() const { m_hints |= ShouldUseCacheHint; m_cache = 0; } @@ -142,7 +144,7 @@ public: case QPaintEngine::ConvexMode: return ConvexPolygonHint | ImplicitClose; case QPaintEngine::OddEvenMode: return PolygonHint | OddEvenFill | ImplicitClose; case QPaintEngine::WindingMode: return PolygonHint | WindingFill | ImplicitClose; - case QPaintEngine::PolylineMode: return PolygonHint; + case QPaintEngine::PolylineMode: return PolygonHint | ExplicitOpen; default: return 0; } } |