summaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
authorAnders Bakken <anders.bakken@nokia.com>2009-07-15 17:13:03 (GMT)
committerAnders Bakken <anders.bakken@nokia.com>2009-07-15 17:44:50 (GMT)
commit1c9bb00bf6adb1f76dbcfb151a7b95a0e517ee3c (patch)
tree89b6766f62bcbdc6caf8b5d5c3a6a0fba85b1f1c /src/plugins
parent81049e49971a9f285f36204d6013c3172866718c (diff)
downloadQt-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.cpp8
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;