summaryrefslogtreecommitdiff
path: root/vcl/backendtest/GraphicsRenderTests.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/backendtest/GraphicsRenderTests.cxx')
-rw-r--r--vcl/backendtest/GraphicsRenderTests.cxx44
1 files changed, 44 insertions, 0 deletions
diff --git a/vcl/backendtest/GraphicsRenderTests.cxx b/vcl/backendtest/GraphicsRenderTests.cxx
index 1b98dead0264..263d37cf6d3f 100644
--- a/vcl/backendtest/GraphicsRenderTests.cxx
+++ b/vcl/backendtest/GraphicsRenderTests.cxx
@@ -1503,6 +1503,48 @@ void GraphicsRenderTests::testTextDrawing()
}
}
+void GraphicsRenderTests::testEvenOddRuleInIntersectingRectsWithPolyPolygon()
+{
+ vcl::test::OutputDeviceTestPolyPolygon aOutDevTest;
+ Bitmap aBitmap = aOutDevTest.setupIntersectingRectangles();
+ OUString aTestName = "testEvenOddRuleInIntersectingRectsWithPolyPolygon";
+ if (!SHOULD_ASSERT)
+ {
+ appendTestResult(aTestName, "SKIPPED");
+ return;
+ }
+ vcl::test::TestResult eResult
+ = vcl::test::OutputDeviceTestLine::checkEvenOddRuleInIntersectingRecs(aBitmap);
+ appendTestResult(aTestName, returnTestStatus(eResult),
+ (m_aStoreResultantBitmap ? aBitmap : Bitmap()));
+ if (m_aStoreResultantBitmap)
+ {
+ BitmapEx aBitmapEx(aBitmap);
+ exportBitmapExToImage(m_aUserInstallPath + aTestName + ".png", aBitmapEx);
+ }
+}
+
+void GraphicsRenderTests::testEvenOddRuleInIntersectingRectsWithPolyPolygonB2D()
+{
+ vcl::test::OutputDeviceTestPolyPolygonB2D aOutDevTest;
+ Bitmap aBitmap = aOutDevTest.setupIntersectingRectangles();
+ OUString aTestName = "testEvenOddRuleInIntersectingRectsWithPolyPolygonB2D";
+ if (!SHOULD_ASSERT)
+ {
+ appendTestResult(aTestName, "SKIPPED");
+ return;
+ }
+ vcl::test::TestResult eResult
+ = vcl::test::OutputDeviceTestLine::checkEvenOddRuleInIntersectingRecs(aBitmap);
+ appendTestResult(aTestName, returnTestStatus(eResult),
+ (m_aStoreResultantBitmap ? aBitmap : Bitmap()));
+ if (m_aStoreResultantBitmap)
+ {
+ BitmapEx aBitmapEx(aBitmap);
+ exportBitmapExToImage(m_aUserInstallPath + aTestName + ".png", aBitmapEx);
+ }
+}
+
void GraphicsRenderTests::runALLTests()
{
testDrawRectWithRectangle();
@@ -1575,6 +1617,8 @@ void GraphicsRenderTests::runALLTests()
testClosedBezierWithPolygon();
testFilledAsymmetricalDropShape();
testTextDrawing();
+ testEvenOddRuleInIntersectingRectsWithPolyPolygon();
+ testEvenOddRuleInIntersectingRectsWithPolyPolygonB2D();
}
void GraphicsRenderTests::appendTestResult(OUString aTestName, OUString aTestStatus,