From dfb55f8a6c8d3ec4da840191c331ace3c2aa2bf3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20R=C3=B8dal?= Date: Wed, 10 Oct 2012 16:14:32 +0200 Subject: 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. Task-number: QTBUG-25153 Change-Id: I217e710a30222792ebca3bf297e438d944c32992 Reviewed-by: Lars Knoll --- src/gui/painting/qcosmeticstroker.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/gui/painting/qcosmeticstroker.cpp') diff --git a/src/gui/painting/qcosmeticstroker.cpp b/src/gui/painting/qcosmeticstroker.cpp index 6c1be87c9a..f99edc6194 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; -- cgit v1.2.3