diff options
author | Anders Bakken <anders.bakken@nokia.com> | 2009-07-15 17:13:03 (GMT) |
---|---|---|
committer | Anders Bakken <anders.bakken@nokia.com> | 2009-07-15 17:44:50 (GMT) |
commit | 1c9bb00bf6adb1f76dbcfb151a7b95a0e517ee3c (patch) | |
tree | 89b6766f62bcbdc6caf8b5d5c3a6a0fba85b1f1c /src/plugins | |
parent | 81049e49971a9f285f36204d6013c3172866718c (diff) | |
download | Qt-1c9bb00bf6adb1f76dbcfb151a7b95a0e517ee3c.zip Qt-1c9bb00bf6adb1f76dbcfb151a7b95a0e517ee3c.tar.gz Qt-1c9bb00bf6adb1f76dbcfb151a7b95a0e517ee3c.tar.bz2 |
Fix off by one bug in dfbpe::drawTiledPixmap
The drawTiledPixmap code iterated while x < right and y < bottom. This
should be x <= right and y <= bottom.
Reviewed-by: Donald <qt-info@nokia.com>
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp b/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp index 605324e..49fc5f8 100644 --- a/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp +++ b/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp @@ -1119,9 +1119,9 @@ void QDirectFBPaintEnginePrivate::drawTiledPixmap(const QRectF &dest, const QPix const QSizeF mappedSize(pixmapSize.width() * transform.m11(), pixmapSize.height() * transform.m22()); qreal y = ::fixCoord(destinationRect.y(), mappedSize.height(), offset.y()); const qreal startX = ::fixCoord(destinationRect.x(), mappedSize.width(), offset.x()); - while (y < destinationRect.bottom()) { + while (y <= destinationRect.bottom()) { qreal x = startX; - while (x < destinationRect.right()) { + while (x <= destinationRect.right()) { const DFBRectangle destination = { qRound(x), qRound(y), mappedSize.width(), mappedSize.height() }; surface->StretchBlit(surface, sourceSurface, 0, &destination); x += mappedSize.width(); @@ -1143,10 +1143,10 @@ void QDirectFBPaintEnginePrivate::drawTiledPixmap(const QRectF &dest, const QPix QVarLengthArray<DFBPoint, 16> points(maxCount); int i = 0; - while (y < destinationRect.bottom()) { + while (y <= destinationRect.bottom()) { Q_ASSERT(i < maxCount); qreal x = startX; - while (x < destinationRect.right()) { + while (x <= destinationRect.right()) { points[i].x = qRound(x); points[i].y = qRound(y); sourceRects[i].x = 0; |