diff options
author | Samuel Rødal <sroedal@trolltech.com> | 2010-04-19 10:31:21 (GMT) |
---|---|---|
committer | Samuel Rødal <sroedal@trolltech.com> | 2010-04-20 08:41:19 (GMT) |
commit | 67ffe10585bc683cd160cef95fef55e8301a6ab5 (patch) | |
tree | 132238ec1c1efa0c8aab5b94593807c81a2e152f /src/gui | |
parent | d738414926bc575a37c6ae6c6cca68d01439b2ef (diff) | |
download | Qt-67ffe10585bc683cd160cef95fef55e8301a6ab5.zip Qt-67ffe10585bc683cd160cef95fef55e8301a6ab5.tar.gz Qt-67ffe10585bc683cd160cef95fef55e8301a6ab5.tar.bz2 |
Fixed image drawing inconsistencies when drawing 1x1 images/subrects.
We special cased 1x1 source rects by calling fillRect() with a solid
color, but that produces slightly different rasterization leading to
gaps when drawing 9-patch images for example. This patch makes us only
use the optimized path for scaling transforms or simpler.
Task-number: QTBUG-10018
Reviewed-by: Gunnar Sletta
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/painting/qpaintengine_raster.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/painting/qpaintengine_raster.cpp b/src/gui/painting/qpaintengine_raster.cpp index 8f14583..9148ac2 100644 --- a/src/gui/painting/qpaintengine_raster.cpp +++ b/src/gui/painting/qpaintengine_raster.cpp @@ -2552,7 +2552,7 @@ void QRasterPaintEngine::drawImage(const QRectF &r, const QImage &img, const QRe int sr_t = qFloor(sr.top()); int sr_b = qCeil(sr.bottom()) - 1; - if (!s->flags.antialiased && sr_l == sr_r && sr_t == sr_b) { + if (s->matrix.type() <= QTransform::TxScale && !s->flags.antialiased && sr_l == sr_r && sr_t == sr_b) { // as fillRect will apply the aliased coordinate delta we need to // subtract it here as we don't use it for image drawing QTransform old = s->matrix; |