diff options
author | aavit <qt-info@nokia.com> | 2011-06-02 13:29:11 (GMT) |
---|---|---|
committer | aavit <qt-info@nokia.com> | 2011-06-02 14:26:50 (GMT) |
commit | 43ce5bab32e0d28366317be99df5e6df70787826 (patch) | |
tree | 19e1d903ae5c04cebdaa48d6d8b62ff3fec1b3c8 /src/gui/painting | |
parent | 4f46153bce807a5c178a60ce89c38fdd30d13f49 (diff) | |
download | Qt-43ce5bab32e0d28366317be99df5e6df70787826.zip Qt-43ce5bab32e0d28366317be99df5e6df70787826.tar.gz Qt-43ce5bab32e0d28366317be99df5e6df70787826.tar.bz2 |
Fix problem with cosmetic stroking of cubic beziers
The new algorithm would fail if the start and end point were identical.
Diffstat (limited to 'src/gui/painting')
-rw-r--r-- | src/gui/painting/qcosmeticstroker.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gui/painting/qcosmeticstroker.cpp b/src/gui/painting/qcosmeticstroker.cpp index 47a1359..cdc0978 100644 --- a/src/gui/painting/qcosmeticstroker.cpp +++ b/src/gui/painting/qcosmeticstroker.cpp @@ -663,8 +663,8 @@ void QCosmeticStroker::renderCubicSubdivision(QCosmeticStroker::PointF *points, qreal dy = points[3].y - points[0].y; qreal len = ((qreal).25) * (qAbs(dx) + qAbs(dy)); - if (qAbs(dx * (points[0].y - points[2].y) - dy * (points[0].x - points[2].x)) > len || - qAbs(dx * (points[0].y - points[1].y) - dy * (points[0].x - points[1].x)) > len) { + if (qAbs(dx * (points[0].y - points[2].y) - dy * (points[0].x - points[2].x)) >= len || + qAbs(dx * (points[0].y - points[1].y) - dy * (points[0].x - points[1].x)) >= len) { splitCubic(points); --level; |