diff options
author | Bjørn Erik Nilsen <bjorn.nilsen@nokia.com> | 2009-06-04 09:26:33 (GMT) |
---|---|---|
committer | Bjørn Erik Nilsen <bjorn.nilsen@nokia.com> | 2009-06-04 09:26:33 (GMT) |
commit | 95c0a8de7af1e631485117f5764f4e2677ec6d0b (patch) | |
tree | 9f1fd8726b7f33a6958f3cf395c3ea1300c2d580 /tests/auto/qpainter | |
parent | a800e1d5e7fa69a3bfa21d74c5db47f5a41ed65c (diff) | |
parent | 397c3bb494e220af5ef1cf6e47cfdfc84b61540b (diff) | |
download | Qt-95c0a8de7af1e631485117f5764f4e2677ec6d0b.zip Qt-95c0a8de7af1e631485117f5764f4e2677ec6d0b.tar.gz Qt-95c0a8de7af1e631485117f5764f4e2677ec6d0b.tar.bz2 |
Merge commit 'mainline/master' into kinetic-declarativeui
Conflicts:
configure.exe
src/gui/math3d/qmatrix4x4.cpp
src/gui/math3d/qmatrix4x4.h
tools/qdoc3/htmlgenerator.cpp
Diffstat (limited to 'tests/auto/qpainter')
-rw-r--r-- | tests/auto/qpainter/tst_qpainter.cpp | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/auto/qpainter/tst_qpainter.cpp b/tests/auto/qpainter/tst_qpainter.cpp index 87f9c13..af0f6cf 100644 --- a/tests/auto/qpainter/tst_qpainter.cpp +++ b/tests/auto/qpainter/tst_qpainter.cpp @@ -226,6 +226,7 @@ private slots: void extendedBlendModes(); void zeroOpacity(); + void clippingBug(); private: void fillData(); @@ -4168,5 +4169,28 @@ void tst_QPainter::zeroOpacity() QCOMPARE(target.pixel(0, 0), 0xff000000); } +void tst_QPainter::clippingBug() +{ + QImage img(32, 32, QImage::Format_ARGB32_Premultiplied); + img.fill(0); + + QImage expected = img; + QPainter p(&expected); + p.fillRect(1, 1, 30, 30, Qt::red); + p.end(); + + QPainterPath path; + path.addRect(1, 1, 30, 30); + path.addRect(1, 1, 30, 30); + path.addRect(1, 1, 30, 30); + + p.begin(&img); + p.setClipPath(path); + p.fillRect(0, 0, 32, 32, Qt::red); + p.end(); + + QCOMPARE(img, expected); +} + QTEST_MAIN(tst_QPainter) #include "tst_qpainter.moc" |