diff options
author | Iikka Eklund <iikka.eklund@digia.com> | 2014-04-02 07:36:48 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-04-02 07:36:48 +0200 |
commit | d6f58e5e17d58c640fc7779652008fda0d66f41d (patch) | |
tree | d50d27e260c9eaf4bc2bcb4480b8a069a3aed857 /tests/auto/gui/image/qimage/tst_qimage.cpp | |
parent | 83de197a57ff6c3e5bbad26bd871981285384fcb (diff) | |
parent | 0ab63b035a649dc1982c867cd37d466d249004b9 (diff) |
Merge "Merge remote-tracking branch 'origin/stable' into dev" into refs/staging/dev
Diffstat (limited to 'tests/auto/gui/image/qimage/tst_qimage.cpp')
-rw-r--r-- | tests/auto/gui/image/qimage/tst_qimage.cpp | 21 |
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); |