diff options
author | Samuel Rødal <sroedal@trolltech.com> | 2009-05-06 07:43:32 (GMT) |
---|---|---|
committer | Samuel Rødal <sroedal@trolltech.com> | 2009-05-06 08:01:58 (GMT) |
commit | ffbb3c1a2aee4134dce80cd144a26bf32865b698 (patch) | |
tree | 3f633a0cd4911d355d84c6109c44a4c71734f7c4 /src/gui/painting/qblendfunctions.cpp | |
parent | a1d2c3c589a03cc427dcc22d109003576add9500 (diff) | |
download | Qt-ffbb3c1a2aee4134dce80cd144a26bf32865b698.zip Qt-ffbb3c1a2aee4134dce80cd144a26bf32865b698.tar.gz Qt-ffbb3c1a2aee4134dce80cd144a26bf32865b698.tar.bz2 |
Fixed some inconsistencies for image drawing on non-integer coords.
Don't use aliased coordinate delta for image drawing.
Related to change fde7475bcf9c10522a8170e6eb8fb9a8fadc21cd.
Task-number: 251561
Reviewed-by: Trond
Diffstat (limited to 'src/gui/painting/qblendfunctions.cpp')
-rw-r--r-- | src/gui/painting/qblendfunctions.cpp | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/src/gui/painting/qblendfunctions.cpp b/src/gui/painting/qblendfunctions.cpp index dd7b016..93f11e1 100644 --- a/src/gui/painting/qblendfunctions.cpp +++ b/src/gui/painting/qblendfunctions.cpp @@ -44,8 +44,6 @@ QT_BEGIN_NAMESPACE -static const qreal aliasedCoordinateDelta = 0.5 - 0.015625; - struct SourceOnlyAlpha { inline uchar alpha(uchar src) const { return src; } @@ -140,14 +138,11 @@ struct Blend_ARGB32_on_RGB16_SourceAndConstAlpha { template <typename SRC, typename T> void qt_scale_image_16bit(uchar *destPixels, int dbpl, const uchar *srcPixels, int sbpl, - const QRectF &target, + const QRectF &targetRect, const QRectF &srcRect, const QRect &clip, T blender) { - const QRectF targetRect = target.translated(aliasedCoordinateDelta, - aliasedCoordinateDelta); - qreal sx = targetRect.width() / (qreal) srcRect.width(); qreal sy = targetRect.height() / (qreal) srcRect.height(); @@ -618,14 +613,11 @@ struct Blend_ARGB32_on_ARGB32_SourceAndConstAlpha { template <typename T> void qt_scale_image_32bit(uchar *destPixels, int dbpl, const uchar *srcPixels, int sbpl, - const QRectF &target, + const QRectF &targetRect, const QRectF &srcRect, const QRect &clip, T blender) { - const QRectF targetRect = target.translated(aliasedCoordinateDelta, - aliasedCoordinateDelta); - qreal sx = targetRect.width() / (qreal) srcRect.width(); qreal sy = targetRect.height() / (qreal) srcRect.height(); |