diff options
-rw-r--r-- | src/gui/painting/qdrawhelper.cpp | 2 | ||||
-rw-r--r-- | tests/auto/gui/painting/qpainter/tst_qpainter.cpp | 17 |
2 files changed, 17 insertions, 2 deletions
diff --git a/src/gui/painting/qdrawhelper.cpp b/src/gui/painting/qdrawhelper.cpp index 9292eeb4a5..55a48395c8 100644 --- a/src/gui/painting/qdrawhelper.cpp +++ b/src/gui/painting/qdrawhelper.cpp @@ -4335,7 +4335,6 @@ static CompositionFunctionSolid functionForModeSolid_C[] = { rasterop_solid_NotSource, rasterop_solid_NotSourceAndDestination, rasterop_solid_SourceAndNotDestination, - rasterop_solid_SourceAndNotDestination, rasterop_solid_NotSourceOrDestination, rasterop_solid_SourceOrNotDestination, rasterop_solid_ClearDestination, @@ -4379,7 +4378,6 @@ static CompositionFunction functionForMode_C[] = { rasterop_NotSource, rasterop_NotSourceAndDestination, rasterop_SourceAndNotDestination, - rasterop_SourceAndNotDestination, rasterop_NotSourceOrDestination, rasterop_SourceOrNotDestination, rasterop_ClearDestination, diff --git a/tests/auto/gui/painting/qpainter/tst_qpainter.cpp b/tests/auto/gui/painting/qpainter/tst_qpainter.cpp index 5af5b1a269..0675a6cf9d 100644 --- a/tests/auto/gui/painting/qpainter/tst_qpainter.cpp +++ b/tests/auto/gui/painting/qpainter/tst_qpainter.cpp @@ -296,6 +296,8 @@ private slots: void blendARGBonRGB_data(); void blendARGBonRGB(); + void RasterOp_NotDestination(); + private: void fillData(); void setPenColor(QPainter& p); @@ -4803,6 +4805,21 @@ void tst_QPainter::cosmeticStrokerClipping() QCOMPARE(old, image); } +void tst_QPainter::RasterOp_NotDestination() +{ + QImage image(3, 3, QImage::Format_RGB32); + image.fill(Qt::red); + + { + QPainter p(&image); + p.setCompositionMode(QPainter::RasterOp_NotDestination); + p.fillRect(image.rect(), Qt::black); + } + + uint pixel = image.pixel(1, 1); + QCOMPARE(pixel, 0xff00ffff); +} + QTEST_MAIN(tst_QPainter) #include "tst_qpainter.moc" |