diff options
author | Eirik Aavitsland <eirik.aavitsland@qt.io> | 2021-02-10 10:44:44 +0100 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2021-02-10 23:23:58 +0000 |
commit | 92e813b1b7c2cf3398946fab873841f828c21b9f (patch) | |
tree | f921c1082603a37a6377914c3a2c0b54d02c84e1 | |
parent | 856c7e5c0ade5bf23c35aa5249758046b355d4af (diff) |
Filter cosmetic lines using transformed, not world coordinates
Lines smaller than 1e-12 would not be drawn even when scaled up.
Fixes: QTBUG-75630
Change-Id: I8f261876c325b60f61e95ca2e5fde2cb227d4cba
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
(cherry picked from commit 1549dff04c49aa37333e54f8bc45900d0f35b270)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r-- | src/gui/painting/qcosmeticstroker.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/gui/painting/qcosmeticstroker.cpp b/src/gui/painting/qcosmeticstroker.cpp index 65bf6c6831..695cba08f1 100644 --- a/src/gui/painting/qcosmeticstroker.cpp +++ b/src/gui/painting/qcosmeticstroker.cpp @@ -367,14 +367,14 @@ bool QCosmeticStroker::clipLine(qreal &x1, qreal &y1, qreal &x2, qreal &y2) void QCosmeticStroker::drawLine(const QPointF &p1, const QPointF &p2) { - if (p1 == p2) { + QPointF start = p1 * state->matrix; + QPointF end = p2 * state->matrix; + + if (start == end) { drawPoints(&p1, 1); return; } - QPointF start = p1 * state->matrix; - QPointF end = p2 * state->matrix; - patternOffset = state->lastPen.dashOffset()*64; lastPixel.x = INT_MIN; lastPixel.y = INT_MIN; |