summaryrefslogtreecommitdiffstats
path: root/src/gui/painting
diff options
context:
space:
mode:
authorGunnar Sletta <gunnar@trolltech.com>2009-11-13 10:53:27 (GMT)
committerGunnar Sletta <gunnar@trolltech.com>2009-11-13 10:53:27 (GMT)
commitbecf7dc2b4b7c2609350eb3236f854c1a4a344f5 (patch)
tree9cdc7101f704a7c6b6544c3aa74f79e5f2fdd1dc /src/gui/painting
parent3794e55c2c8427dd8bd4f86af5e894cc80267881 (diff)
parent60d2ab05c350f866f942a35f341f455015fdb800 (diff)
downloadQt-becf7dc2b4b7c2609350eb3236f854c1a4a344f5.zip
Qt-becf7dc2b4b7c2609350eb3236f854c1a4a344f5.tar.gz
Qt-becf7dc2b4b7c2609350eb3236f854c1a4a344f5.tar.bz2
Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/oslo-staging-2 into 4.6
Diffstat (limited to 'src/gui/painting')
-rw-r--r--src/gui/painting/painting.pri1
-rw-r--r--src/gui/painting/qblendfunctions.cpp24
-rw-r--r--src/gui/painting/qbrush.cpp2
3 files changed, 17 insertions, 10 deletions
diff --git a/src/gui/painting/painting.pri b/src/gui/painting/painting.pri
index c35c33a..628a109 100644
--- a/src/gui/painting/painting.pri
+++ b/src/gui/painting/painting.pri
@@ -370,7 +370,6 @@ symbian {
SOURCES += painting/qwindowsurface_s60.cpp
armccIfdefBlock = \
"$${LITERAL_HASH}if defined(ARMV6)" \
- "MACRO QT_HAVE_ARMV6" \
"SOURCEPATH painting" \
"SOURCE qblendfunctions_armv6_rvct.s" \
"SOURCE qdrawhelper_armv6_rvct.s" \
diff --git a/src/gui/painting/qblendfunctions.cpp b/src/gui/painting/qblendfunctions.cpp
index 8737f10..ba1b642 100644
--- a/src/gui/painting/qblendfunctions.cpp
+++ b/src/gui/painting/qblendfunctions.cpp
@@ -223,21 +223,25 @@ void qt_scale_image_16bit(uchar *destPixels, int dbpl,
int h = ty2 - ty1;
int w = tx2 - tx1;
+
quint32 basex;
quint32 srcy;
+ const int dstx = qCeil((tx1 + 0.5 - qMin(targetRect.left(), targetRect.right())) * ix) - 1;
+ const int dsty = qCeil((ty1 + 0.5 - qMin(targetRect.top(), targetRect.bottom())) * iy) - 1;
+
if (sx < 0) {
- int dstx = qFloor((tx1 + 0.5 - targetRect.right()) * ix) + 1;
+ int dstx = qFloor((tx1 + qreal(0.5) - targetRect.right()) * ix) + 1;
basex = quint32(srcRect.right() * 65536) + dstx;
} else {
- int dstx = qCeil((tx1 + 0.5 - targetRect.left()) * ix) - 1;
+ int dstx = qCeil((tx1 + qreal(0.5) - targetRect.left()) * ix) - 1;
basex = quint32(srcRect.left() * 65536) + dstx;
}
if (sy < 0) {
- int dsty = qFloor((ty1 + 0.5 - targetRect.bottom()) * iy) + 1;
+ int dsty = qFloor((ty1 + qreal(0.5) - targetRect.bottom()) * iy) + 1;
srcy = quint32(srcRect.bottom() * 65536) + dsty;
} else {
- int dsty = qCeil((ty1 + 0.5 - targetRect.top()) * iy) - 1;
+ int dsty = qCeil((ty1 + qreal(0.5) - targetRect.top()) * iy) - 1;
srcy = quint32(srcRect.top() * 65536) + dsty;
}
@@ -738,18 +742,22 @@ template <typename T> void qt_scale_image_32bit(uchar *destPixels, int dbpl,
quint32 basex;
quint32 srcy;
+ const int dstx = qCeil((tx1 + 0.5 - qMin(targetRect.left(), targetRect.right())) * ix) - 1;
+ const int dsty = qCeil((ty1 + 0.5 - qMin(targetRect.top(), targetRect.bottom())) * iy) - 1;
+
+
if (sx < 0) {
- int dstx = qFloor((tx1 + 0.5 - targetRect.right()) * ix) + 1;
+ int dstx = qFloor((tx1 + qreal(0.5) - targetRect.right()) * ix) + 1;
basex = quint32(srcRect.right() * 65536) + dstx;
} else {
- int dstx = qCeil((tx1 + 0.5 - targetRect.left()) * ix) - 1;
+ int dstx = qCeil((tx1 + qreal(0.5) - targetRect.left()) * ix) - 1;
basex = quint32(srcRect.left() * 65536) + dstx;
}
if (sy < 0) {
- int dsty = qFloor((ty1 + 0.5 - targetRect.bottom()) * iy) + 1;
+ int dsty = qFloor((ty1 + qreal(0.5) - targetRect.bottom()) * iy) + 1;
srcy = quint32(srcRect.bottom() * 65536) + dsty;
} else {
- int dsty = qCeil((ty1 + 0.5 - targetRect.top()) * iy) - 1;
+ int dsty = qCeil((ty1 + qreal(0.5) - targetRect.top()) * iy) - 1;
srcy = quint32(srcRect.top() * 65536) + dsty;
}
diff --git a/src/gui/painting/qbrush.cpp b/src/gui/painting/qbrush.cpp
index afe9986..7273c35 100644
--- a/src/gui/painting/qbrush.cpp
+++ b/src/gui/painting/qbrush.cpp
@@ -970,7 +970,7 @@ bool QBrush::operator==(const QBrush &b) const
QDebug operator<<(QDebug dbg, const QBrush &b)
{
#ifndef Q_BROKEN_DEBUG_STREAM
- const char *BRUSH_STYLES[] = {
+ static const char *BRUSH_STYLES[] = {
"NoBrush",
"SolidPattern",
"Dense1Pattern",