summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorSamuel Rødal <sroedal@trolltech.com>2009-06-03 12:16:39 (GMT)
committerSamuel Rødal <sroedal@trolltech.com>2009-06-03 12:22:30 (GMT)
commit91f5c7314afdfd43c867266fc1bc418e0f70bac7 (patch)
treeecf73dfef25df6d4eda6d389623707b93a4b0a6e /src/gui
parentd16b52d5346a3b652ad7507b24373c51fc0d530c (diff)
downloadQt-91f5c7314afdfd43c867266fc1bc418e0f70bac7.zip
Qt-91f5c7314afdfd43c867266fc1bc418e0f70bac7.tar.gz
Qt-91f5c7314afdfd43c867266fc1bc418e0f70bac7.tar.bz2
Fixed raster bug causing fully clipped images to be partially blended.
The blend functions assume the width / height of the images being blended to be greater than 0. A width of 0 caused the first iteration of a duff's device memcpy (QT_MEMCPY_USHORT) to be executed, thus blending 8 pixels instead of none. BT: yes Task-number: 255014 Reviewed-by: Trond
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/painting/qpaintengine_raster.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gui/painting/qpaintengine_raster.cpp b/src/gui/painting/qpaintengine_raster.cpp
index 58ffb02..1a1c204 100644
--- a/src/gui/painting/qpaintengine_raster.cpp
+++ b/src/gui/painting/qpaintengine_raster.cpp
@@ -1053,7 +1053,7 @@ void QRasterPaintEnginePrivate::drawImage(const QPointF &pt,
int d = x + iw - cx2;
iw -= d;
}
- if (iw < 0)
+ if (iw <= 0)
return;
// adapt the y paremeters...
@@ -1070,7 +1070,7 @@ void QRasterPaintEnginePrivate::drawImage(const QPointF &pt,
int d = y + ih - cy2;
ih -= d;
}
- if (ih < 0)
+ if (ih <= 0)
return;
// call the blend function...