diff options
author | Samuel Rødal <samuel.rodal@digia.com> | 2012-10-10 14:14:32 (GMT) |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2012-10-17 11:06:53 (GMT) |
commit | 54e53d3ca97a30acfcb50eee9d28c93d684753b7 (patch) | |
tree | 2387dfaa1e5d97ec52c65a0b56528273e76bb675 /src/gui | |
parent | 429e80f10aaa3b710b03960c9169b4c296d9df0f (diff) | |
download | Qt-54e53d3ca97a30acfcb50eee9d28c93d684753b7.zip Qt-54e53d3ca97a30acfcb50eee9d28c93d684753b7.tar.gz Qt-54e53d3ca97a30acfcb50eee9d28c93d684753b7.tar.bz2 |
Fixed cosmetic line drawing where begin and end points are equal.
This case has typically required specific work-arounds in other
rendering paths as well.
(cherry picked from commit dfb55f8a6c8d3ec4da840191c331ace3c2aa2bf3)
Task-number: QTBUG-25153
Change-Id: I217e710a30222792ebca3bf297e438d944c32992
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/painting/qcosmeticstroker.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/gui/painting/qcosmeticstroker.cpp b/src/gui/painting/qcosmeticstroker.cpp index 6c1be87..f99edc6 100644 --- a/src/gui/painting/qcosmeticstroker.cpp +++ b/src/gui/painting/qcosmeticstroker.cpp @@ -356,6 +356,11 @@ bool QCosmeticStroker::clipLine(qreal &x1, qreal &y1, qreal &x2, qreal &y2) void QCosmeticStroker::drawLine(const QPointF &p1, const QPointF &p2) { + if (p1 == p2) { + drawPoints(&p1, 1); + return; + } + QPointF start = p1 * state->matrix; QPointF end = p2 * state->matrix; |