summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/gui/image/qimage/tst_qimage.cpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/auto/gui/image/qimage/tst_qimage.cpp b/tests/auto/gui/image/qimage/tst_qimage.cpp
index 01a56883bf..95a9b142ec 100644
--- a/tests/auto/gui/image/qimage/tst_qimage.cpp
+++ b/tests/auto/gui/image/qimage/tst_qimage.cpp
@@ -168,6 +168,8 @@ private slots:
void convertOverUnPreMul();
+ void scaled_QTBUG35972();
+
void cleanupFunctions();
};
@@ -2439,6 +2441,25 @@ void tst_QImage::convertOverUnPreMul()
}
}
+void tst_QImage::scaled_QTBUG35972()
+{
+ QImage src(532,519,QImage::Format_ARGB32_Premultiplied);
+ src.fill(QColor(Qt::white));
+ QImage dest(1000,1000,QImage::Format_ARGB32_Premultiplied);
+ dest.fill(QColor(Qt::white));
+ QPainter painter1(&dest);
+ const QTransform trf(1.25, 0,
+ 0, 1.25,
+ /*dx */ 15.900000000000034, /* dy */ 72.749999999999986);
+ painter1.setTransform(trf);
+ painter1.drawImage(QRectF(-2.6, -2.6, 425.6, 415.20000000000005), src, QRectF(0,0,532,519));
+
+ const quint32 *pixels = reinterpret_cast<const quint32 *>(dest.constBits());
+ int size = dest.width()*dest.height();
+ for (int i = 0; i < size; ++i)
+ QCOMPARE(pixels[i], 0xffffffff);
+}
+
static void cleanupFunction(void* info)
{
bool *called = static_cast<bool*>(info);