summaryrefslogtreecommitdiffstats
path: root/src/gui/painting/qrasterizer.cpp
diff options
context:
space:
mode:
authorTom Cooksey <thomas.cooksey@nokia.com>2009-09-17 15:22:00 (GMT)
committerTom Cooksey <thomas.cooksey@nokia.com>2009-09-17 15:22:00 (GMT)
commitb7923d48fb6d755d4563eeed0e7f3cbc774d69d5 (patch)
treeec8bb06f58f714d0b799164693e93bf0d51b6bcf /src/gui/painting/qrasterizer.cpp
parente6dbbd0398d70ee64a3b8129e9621cfa15d70f8c (diff)
parenta62506aae40ede3fd8030312321759f669458909 (diff)
downloadQt-b7923d48fb6d755d4563eeed0e7f3cbc774d69d5.zip
Qt-b7923d48fb6d755d4563eeed0e7f3cbc774d69d5.tar.gz
Qt-b7923d48fb6d755d4563eeed0e7f3cbc774d69d5.tar.bz2
Merge branch '4.5' into 4.6
Conflicts: tests/auto/qimagereader/tst_qimagereader.cpp tests/auto/qpainter/tst_qpainter.cpp tests/auto/qtwidgets/tst_qtwidgets.cpp
Diffstat (limited to 'src/gui/painting/qrasterizer.cpp')
-rw-r--r--src/gui/painting/qrasterizer.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gui/painting/qrasterizer.cpp b/src/gui/painting/qrasterizer.cpp
index 0b33369..66d0c9d 100644
--- a/src/gui/painting/qrasterizer.cpp
+++ b/src/gui/painting/qrasterizer.cpp
@@ -707,10 +707,12 @@ void QRasterizer::rasterizeLine(const QPointF &a, const QPointF &b, qreal width,
if (a == b || width == 0 || d->clipRect.isEmpty())
return;
+ Q_ASSERT(width > 0.0);
+
QPointF pa = a;
QPointF pb = b;
- QPointF offs = QPointF(qAbs(b.y() - a.y()), qAbs(b.x() - a.x())) * width * 0.5;
+ QPointF offs = QPointF(qAbs(b.y() - a.y()), qAbs(b.x() - a.x())) * width * 0.5;
if (squareCap)
offs += QPointF(offs.y(), offs.x());
const QRectF clip(d->clipRect.topLeft() - offs, d->clipRect.bottomRight() + QPoint(1, 1) + offs);