[Libreoffice-commits] core.git: include/vcl vcl/backendtest vcl/inc

homeboy445 (via logerrit) logerrit at kemper.freedesktop.org
Fri Sep 3 15:36:27 UTC 2021


 include/vcl/test/GraphicsRenderTests.hxx         |   16 +
 vcl/backendtest/GraphicsRenderTests.cxx          |  338 +++++++++++++++++++++++
 vcl/backendtest/outputdevice/line.cxx            |   26 +
 vcl/backendtest/outputdevice/pixel.cxx           |   26 +
 vcl/backendtest/outputdevice/polygon.cxx         |   27 +
 vcl/backendtest/outputdevice/polyline.cxx        |   27 +
 vcl/backendtest/outputdevice/polyline_b2d.cxx    |   26 +
 vcl/backendtest/outputdevice/polypolygon.cxx     |   32 ++
 vcl/backendtest/outputdevice/polypolygon_b2d.cxx |   32 ++
 vcl/backendtest/outputdevice/rectangle.cxx       |   26 +
 vcl/inc/test/outputdevice.hxx                    |   16 +
 11 files changed, 592 insertions(+)

New commits:
commit a979f18254749acac4c71596c30dde9ad2908455
Author:     homeboy445 <akshitsan13 at gmail.com>
AuthorDate: Fri Jul 23 16:06:51 2021 +0530
Commit:     Tomaž Vajngerl <quikee at gmail.com>
CommitDate: Fri Sep 3 17:35:53 2021 +0200

    backendtest: Rectangle on wide surfaces Drawing test
    
    This tests draws a rectangle using all possible drawing
    methods for drawing a rectangle on a wide surface(1028x1028 and 4096x4096)
    and check it the usual way.
    
    Change-Id: I6fcf9c9b4b150cbe959b8151f327bcdce1b1139a
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119464
    Tested-by: Jenkins
    Reviewed-by: Tomaž Vajngerl <quikee at gmail.com>

diff --git a/include/vcl/test/GraphicsRenderTests.hxx b/include/vcl/test/GraphicsRenderTests.hxx
index 41cbe561b483..7d44b538a948 100644
--- a/include/vcl/test/GraphicsRenderTests.hxx
+++ b/include/vcl/test/GraphicsRenderTests.hxx
@@ -127,6 +127,22 @@ class VCL_PLUGIN_PUBLIC GraphicsRenderTests
     void testTextDrawing();
     void testEvenOddRuleInIntersectingRectsWithPolyPolygon();
     void testEvenOddRuleInIntersectingRectsWithPolyPolygonB2D();
+    void testDrawRectangleOnSize1028WithRect();
+    void testDrawRectangleOnSize4096WithRect();
+    void testDrawRectangleOnSize1028WithPixel();
+    void testDrawRectangleOnSize4096WithPixel();
+    void testDrawRectangleOnSize1028WithLine();
+    void testDrawRectangleOnSize4096WithLine();
+    void testDrawRectangleOnSize1028WithPolygon();
+    void testDrawRectangleOnSize4096WithPolygon();
+    void testDrawRectangleOnSize1028WithPolyLine();
+    void testDrawRectangleOnSize4096WithPolyLine();
+    void testDrawRectangleOnSize1028WithPolyLineB2D();
+    void testDrawRectangleOnSize4096WithPolyLineB2D();
+    void testDrawRectangleOnSize1028WithPolyPolygon();
+    void testDrawRectangleOnSize4096WithPolyPolygon();
+    void testDrawRectangleOnSize1028WithPolyPolygonB2D();
+    void testDrawRectangleOnSize4096WithPolygonPolygonB2D();
     static OUString returnTestStatus(vcl::test::TestResult const result);
     void runALLTests();
     void appendTestResult(OUString aTestName, OUString aTestStatus, Bitmap aTestBitmap = Bitmap());
diff --git a/vcl/backendtest/GraphicsRenderTests.cxx b/vcl/backendtest/GraphicsRenderTests.cxx
index ad508ec6d975..7928c06e2fb0 100644
--- a/vcl/backendtest/GraphicsRenderTests.cxx
+++ b/vcl/backendtest/GraphicsRenderTests.cxx
@@ -1693,6 +1693,328 @@ void GraphicsRenderTests::testDrawBlend32bpp()
     }
 }
 
+void GraphicsRenderTests::testDrawRectangleOnSize1028WithRect()
+{
+    vcl::test::OutputDeviceTestRect aOutDevTest;
+    Bitmap aBitmap = aOutDevTest.setupRectangleOnSize1028();
+    m_aCurGraphicsBackend = aOutDevTest.getRenderBackendName();
+    OUString aTestName = "testDrawRectangleOnSize1028WithRect";
+    if (!SHOULD_ASSERT)
+    {
+        appendTestResult(aTestName, "SKIPPED");
+        return;
+    }
+    vcl::test::TestResult eResult = vcl::test::OutputDeviceTestCommon::checkRectangle(aBitmap);
+    appendTestResult(aTestName, returnTestStatus(eResult),
+                     (m_aStoreResultantBitmap ? aBitmap : Bitmap()));
+    if (m_aStoreResultantBitmap)
+    {
+        BitmapEx aBitmapEx(aBitmap);
+        exportBitmapExToImage(m_aUserInstallPath + aTestName + ".png", aBitmapEx);
+    }
+}
+
+void GraphicsRenderTests::testDrawRectangleOnSize4096WithRect()
+{
+    vcl::test::OutputDeviceTestRect aOutDevTest;
+    Bitmap aBitmap = aOutDevTest.setupRectangleOnSize4096();
+    m_aCurGraphicsBackend = aOutDevTest.getRenderBackendName();
+    OUString aTestName = "testDrawRectangleOnSize4096WithRect";
+    if (!SHOULD_ASSERT)
+    {
+        appendTestResult(aTestName, "SKIPPED");
+        return;
+    }
+    vcl::test::TestResult eResult = vcl::test::OutputDeviceTestCommon::checkRectangle(aBitmap);
+    appendTestResult(aTestName, returnTestStatus(eResult),
+                     (m_aStoreResultantBitmap ? aBitmap : Bitmap()));
+    if (m_aStoreResultantBitmap)
+    {
+        BitmapEx aBitmapEx(aBitmap);
+        exportBitmapExToImage(m_aUserInstallPath + aTestName + ".png", aBitmapEx);
+    }
+}
+
+void GraphicsRenderTests::testDrawRectangleOnSize1028WithPixel()
+{
+    vcl::test::OutputDeviceTestPixel aOutDevTest;
+    Bitmap aBitmap = aOutDevTest.setupRectangleOnSize1028();
+    OUString aTestName = "testDrawRectangleOnSize1028WithPixel";
+    if (!SHOULD_ASSERT)
+    {
+        appendTestResult(aTestName, "SKIPPED");
+        return;
+    }
+    vcl::test::TestResult eResult = vcl::test::OutputDeviceTestCommon::checkRectangle(aBitmap);
+    appendTestResult(aTestName, returnTestStatus(eResult),
+                     (m_aStoreResultantBitmap ? aBitmap : Bitmap()));
+    if (m_aStoreResultantBitmap)
+    {
+        BitmapEx aBitmapEx(aBitmap);
+        exportBitmapExToImage(m_aUserInstallPath + aTestName + ".png", aBitmapEx);
+    }
+}
+
+void GraphicsRenderTests::testDrawRectangleOnSize4096WithPixel()
+{
+    vcl::test::OutputDeviceTestPixel aOutDevTest;
+    Bitmap aBitmap = aOutDevTest.setupRectangleOnSize4096();
+    OUString aTestName = "testDrawRectangleOnSize4096WithPixel";
+    if (!SHOULD_ASSERT)
+    {
+        appendTestResult(aTestName, "SKIPPED");
+        return;
+    }
+    vcl::test::TestResult eResult = vcl::test::OutputDeviceTestCommon::checkRectangle(aBitmap);
+    appendTestResult(aTestName, returnTestStatus(eResult),
+                     (m_aStoreResultantBitmap ? aBitmap : Bitmap()));
+    if (m_aStoreResultantBitmap)
+    {
+        BitmapEx aBitmapEx(aBitmap);
+        exportBitmapExToImage(m_aUserInstallPath + aTestName + ".png", aBitmapEx);
+    }
+}
+
+void GraphicsRenderTests::testDrawRectangleOnSize1028WithLine()
+{
+    vcl::test::OutputDeviceTestLine aOutDevTest;
+    Bitmap aBitmap = aOutDevTest.setupRectangleOnSize1028();
+    OUString aTestName = "testDrawRectangleOnSize1028WithLine";
+    if (!SHOULD_ASSERT)
+    {
+        appendTestResult(aTestName, "SKIPPED");
+        return;
+    }
+    vcl::test::TestResult eResult = vcl::test::OutputDeviceTestCommon::checkRectangle(aBitmap);
+    appendTestResult(aTestName, returnTestStatus(eResult),
+                     (m_aStoreResultantBitmap ? aBitmap : Bitmap()));
+    if (m_aStoreResultantBitmap)
+    {
+        BitmapEx aBitmapEx(aBitmap);
+        exportBitmapExToImage(m_aUserInstallPath + aTestName + ".png", aBitmapEx);
+    }
+}
+
+void GraphicsRenderTests::testDrawRectangleOnSize4096WithLine()
+{
+    vcl::test::OutputDeviceTestLine aOutDevTest;
+    Bitmap aBitmap = aOutDevTest.setupRectangleOnSize4096();
+    OUString aTestName = "testDrawRectangleOnSize4096WithLine";
+    if (!SHOULD_ASSERT)
+    {
+        appendTestResult(aTestName, "SKIPPED");
+        return;
+    }
+    vcl::test::TestResult eResult = vcl::test::OutputDeviceTestCommon::checkRectangle(aBitmap);
+    appendTestResult(aTestName, returnTestStatus(eResult),
+                     (m_aStoreResultantBitmap ? aBitmap : Bitmap()));
+    if (m_aStoreResultantBitmap)
+    {
+        BitmapEx aBitmapEx(aBitmap);
+        exportBitmapExToImage(m_aUserInstallPath + aTestName + ".png", aBitmapEx);
+    }
+}
+
+void GraphicsRenderTests::testDrawRectangleOnSize1028WithPolyLine()
+{
+    vcl::test::OutputDeviceTestPolyLine aOutDevTest;
+    Bitmap aBitmap = aOutDevTest.setupRectangleOnSize1028();
+    OUString aTestName = "testDrawRectangleOnSize1028WithPolyLine";
+    if (!SHOULD_ASSERT)
+    {
+        appendTestResult(aTestName, "SKIPPED");
+        return;
+    }
+    vcl::test::TestResult eResult = vcl::test::OutputDeviceTestCommon::checkRectangle(aBitmap);
+    appendTestResult(aTestName, returnTestStatus(eResult),
+                     (m_aStoreResultantBitmap ? aBitmap : Bitmap()));
+    if (m_aStoreResultantBitmap)
+    {
+        BitmapEx aBitmapEx(aBitmap);
+        exportBitmapExToImage(m_aUserInstallPath + aTestName + ".png", aBitmapEx);
+    }
+}
+
+void GraphicsRenderTests::testDrawRectangleOnSize4096WithPolyLine()
+{
+    vcl::test::OutputDeviceTestPolyLine aOutDevTest;
+    Bitmap aBitmap = aOutDevTest.setupRectangleOnSize4096();
+    OUString aTestName = "testDrawRectangleOnSize4096WithPolyLine";
+    if (!SHOULD_ASSERT)
+    {
+        appendTestResult(aTestName, "SKIPPED");
+        return;
+    }
+    vcl::test::TestResult eResult = vcl::test::OutputDeviceTestCommon::checkRectangle(aBitmap);
+    appendTestResult(aTestName, returnTestStatus(eResult),
+                     (m_aStoreResultantBitmap ? aBitmap : Bitmap()));
+    if (m_aStoreResultantBitmap)
+    {
+        BitmapEx aBitmapEx(aBitmap);
+        exportBitmapExToImage(m_aUserInstallPath + aTestName + ".png", aBitmapEx);
+    }
+}
+
+void GraphicsRenderTests::testDrawRectangleOnSize1028WithPolygon()
+{
+    vcl::test::OutputDeviceTestPolygon aOutDevTest;
+    Bitmap aBitmap = aOutDevTest.setupRectangleOnSize1028();
+    OUString aTestName = "testDrawRectangleOnSize1028WithPolygon";
+    if (!SHOULD_ASSERT)
+    {
+        appendTestResult(aTestName, "SKIPPED");
+        return;
+    }
+    vcl::test::TestResult eResult = vcl::test::OutputDeviceTestCommon::checkRectangle(aBitmap);
+    appendTestResult(aTestName, returnTestStatus(eResult),
+                     (m_aStoreResultantBitmap ? aBitmap : Bitmap()));
+    if (m_aStoreResultantBitmap)
+    {
+        BitmapEx aBitmapEx(aBitmap);
+        exportBitmapExToImage(m_aUserInstallPath + aTestName + ".png", aBitmapEx);
+    }
+}
+
+void GraphicsRenderTests::testDrawRectangleOnSize4096WithPolygon()
+{
+    vcl::test::OutputDeviceTestPolygon aOutDevTest;
+    Bitmap aBitmap = aOutDevTest.setupRectangleOnSize4096();
+    OUString aTestName = "testDrawRectangleOnSize4096WithPolygon";
+    if (!SHOULD_ASSERT)
+    {
+        appendTestResult(aTestName, "SKIPPED");
+        return;
+    }
+    vcl::test::TestResult eResult = vcl::test::OutputDeviceTestCommon::checkRectangle(aBitmap);
+    appendTestResult(aTestName, returnTestStatus(eResult),
+                     (m_aStoreResultantBitmap ? aBitmap : Bitmap()));
+    if (m_aStoreResultantBitmap)
+    {
+        BitmapEx aBitmapEx(aBitmap);
+        exportBitmapExToImage(m_aUserInstallPath + aTestName + ".png", aBitmapEx);
+    }
+}
+
+void GraphicsRenderTests::testDrawRectangleOnSize1028WithPolyLineB2D()
+{
+    vcl::test::OutputDeviceTestPolyLineB2D aOutDevTest;
+    Bitmap aBitmap = aOutDevTest.setupRectangleOnSize1028();
+    OUString aTestName = "testDrawRectangleOnSize1028WithPolyLineB2D";
+    if (!SHOULD_ASSERT)
+    {
+        appendTestResult(aTestName, "SKIPPED");
+        return;
+    }
+    vcl::test::TestResult eResult = vcl::test::OutputDeviceTestCommon::checkRectangle(aBitmap);
+    appendTestResult(aTestName, returnTestStatus(eResult),
+                     (m_aStoreResultantBitmap ? aBitmap : Bitmap()));
+    if (m_aStoreResultantBitmap)
+    {
+        BitmapEx aBitmapEx(aBitmap);
+        exportBitmapExToImage(m_aUserInstallPath + aTestName + ".png", aBitmapEx);
+    }
+}
+
+void GraphicsRenderTests::testDrawRectangleOnSize4096WithPolyLineB2D()
+{
+    vcl::test::OutputDeviceTestPolyLineB2D aOutDevTest;
+    Bitmap aBitmap = aOutDevTest.setupRectangleOnSize4096();
+    OUString aTestName = "testDrawRectangleOnSize4096WithPolyLineB2D";
+    if (!SHOULD_ASSERT)
+    {
+        appendTestResult(aTestName, "SKIPPED");
+        return;
+    }
+    vcl::test::TestResult eResult = vcl::test::OutputDeviceTestCommon::checkRectangle(aBitmap);
+    appendTestResult(aTestName, returnTestStatus(eResult),
+                     (m_aStoreResultantBitmap ? aBitmap : Bitmap()));
+    if (m_aStoreResultantBitmap)
+    {
+        BitmapEx aBitmapEx(aBitmap);
+        exportBitmapExToImage(m_aUserInstallPath + aTestName + ".png", aBitmapEx);
+    }
+}
+
+void GraphicsRenderTests::testDrawRectangleOnSize1028WithPolyPolygon()
+{
+    vcl::test::OutputDeviceTestPolyPolygon aOutDevTest;
+    Bitmap aBitmap = aOutDevTest.setupRectangleOnSize1028();
+    OUString aTestName = "testDrawRectangleOnSize1028WithPolyPolygon";
+    if (!SHOULD_ASSERT)
+    {
+        appendTestResult(aTestName, "SKIPPED");
+        return;
+    }
+    vcl::test::TestResult eResult = vcl::test::OutputDeviceTestCommon::checkRectangle(aBitmap);
+    appendTestResult(aTestName, returnTestStatus(eResult),
+                     (m_aStoreResultantBitmap ? aBitmap : Bitmap()));
+    if (m_aStoreResultantBitmap)
+    {
+        BitmapEx aBitmapEx(aBitmap);
+        exportBitmapExToImage(m_aUserInstallPath + aTestName + ".png", aBitmapEx);
+    }
+}
+
+void GraphicsRenderTests::testDrawRectangleOnSize4096WithPolyPolygon()
+{
+    vcl::test::OutputDeviceTestPolyPolygon aOutDevTest;
+    Bitmap aBitmap = aOutDevTest.setupRectangleOnSize4096();
+    OUString aTestName = "testDrawRectangleOnSize4096WithPolyPolygon";
+    if (!SHOULD_ASSERT)
+    {
+        appendTestResult(aTestName, "SKIPPED");
+        return;
+    }
+    vcl::test::TestResult eResult = vcl::test::OutputDeviceTestCommon::checkRectangle(aBitmap);
+    appendTestResult(aTestName, returnTestStatus(eResult),
+                     (m_aStoreResultantBitmap ? aBitmap : Bitmap()));
+    if (m_aStoreResultantBitmap)
+    {
+        BitmapEx aBitmapEx(aBitmap);
+        exportBitmapExToImage(m_aUserInstallPath + aTestName + ".png", aBitmapEx);
+    }
+}
+
+void GraphicsRenderTests::testDrawRectangleOnSize1028WithPolyPolygonB2D()
+{
+    vcl::test::OutputDeviceTestPolyPolygonB2D aOutDevTest;
+    Bitmap aBitmap = aOutDevTest.setupRectangleOnSize1028();
+    OUString aTestName = "testDrawRectangleOnSize1028WithPolyPolygonB2D";
+    if (!SHOULD_ASSERT)
+    {
+        appendTestResult(aTestName, "SKIPPED");
+        return;
+    }
+    vcl::test::TestResult eResult = vcl::test::OutputDeviceTestCommon::checkRectangle(aBitmap);
+    appendTestResult(aTestName, returnTestStatus(eResult),
+                     (m_aStoreResultantBitmap ? aBitmap : Bitmap()));
+    if (m_aStoreResultantBitmap)
+    {
+        BitmapEx aBitmapEx(aBitmap);
+        exportBitmapExToImage(m_aUserInstallPath + aTestName + ".png", aBitmapEx);
+    }
+}
+
+void GraphicsRenderTests::testDrawRectangleOnSize4096WithPolygonPolygonB2D()
+{
+    vcl::test::OutputDeviceTestPolyPolygonB2D aOutDevTest;
+    Bitmap aBitmap = aOutDevTest.setupRectangleOnSize4096();
+    OUString aTestName = "testDrawRectangleOnSize4096WithPolygonPolygonB2D";
+    if (!SHOULD_ASSERT)
+    {
+        appendTestResult(aTestName, "SKIPPED");
+        return;
+    }
+    vcl::test::TestResult eResult = vcl::test::OutputDeviceTestCommon::checkRectangle(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();
@@ -1774,6 +2096,22 @@ void GraphicsRenderTests::runALLTests()
     testDrawBitmapExWithAlpha32bpp();
     testDrawMask32bpp();
     testDrawBlend32bpp();
+    testDrawRectangleOnSize1028WithRect();
+    testDrawRectangleOnSize4096WithRect();
+    testDrawRectangleOnSize1028WithPixel();
+    testDrawRectangleOnSize4096WithPixel();
+    testDrawRectangleOnSize1028WithLine();
+    testDrawRectangleOnSize4096WithLine();
+    testDrawRectangleOnSize1028WithPolyLine();
+    testDrawRectangleOnSize4096WithPolyLine();
+    testDrawRectangleOnSize1028WithPolygon();
+    testDrawRectangleOnSize4096WithPolygon();
+    testDrawRectangleOnSize1028WithPolyLineB2D();
+    testDrawRectangleOnSize4096WithPolyLineB2D();
+    testDrawRectangleOnSize1028WithPolyPolygon();
+    testDrawRectangleOnSize4096WithPolyPolygon();
+    testDrawRectangleOnSize1028WithPolyPolygonB2D();
+    testDrawRectangleOnSize4096WithPolygonPolygonB2D();
 }
 
 void GraphicsRenderTests::appendTestResult(OUString aTestName, OUString aTestStatus,
diff --git a/vcl/backendtest/outputdevice/line.cxx b/vcl/backendtest/outputdevice/line.cxx
index be9deadf9c33..ddff80683898 100644
--- a/vcl/backendtest/outputdevice/line.cxx
+++ b/vcl/backendtest/outputdevice/line.cxx
@@ -48,6 +48,32 @@ Bitmap OutputDeviceTestLine::setupRectangle(bool bEnableAA)
     return mpVirtualDevice->GetBitmap(maVDRectangle.TopLeft(), maVDRectangle.GetSize());
 }
 
+Bitmap OutputDeviceTestLine::setupRectangleOnSize1028()
+{
+    initialSetup(1028, 1028, constBackgroundColor);
+
+    mpVirtualDevice->SetLineColor(constLineColor);
+    mpVirtualDevice->SetFillColor();
+
+    drawLineOffset(*mpVirtualDevice, maVDRectangle, 2);
+    drawLineOffset(*mpVirtualDevice, maVDRectangle, 5);
+
+    return mpVirtualDevice->GetBitmap(maVDRectangle.TopLeft(), maVDRectangle.GetSize());
+}
+
+Bitmap OutputDeviceTestLine::setupRectangleOnSize4096()
+{
+    initialSetup(4096, 4096, constBackgroundColor);
+
+    mpVirtualDevice->SetLineColor(constLineColor);
+    mpVirtualDevice->SetFillColor();
+
+    drawLineOffset(*mpVirtualDevice, maVDRectangle, 2);
+    drawLineOffset(*mpVirtualDevice, maVDRectangle, 5);
+
+    return mpVirtualDevice->GetBitmap(maVDRectangle.TopLeft(), maVDRectangle.GetSize());
+}
+
 Bitmap OutputDeviceTestLine::setupDiamond()
 {
     initialSetup(11, 11, constBackgroundColor);
diff --git a/vcl/backendtest/outputdevice/pixel.cxx b/vcl/backendtest/outputdevice/pixel.cxx
index c0fcc47705f5..8801a9e70d35 100644
--- a/vcl/backendtest/outputdevice/pixel.cxx
+++ b/vcl/backendtest/outputdevice/pixel.cxx
@@ -50,6 +50,32 @@ Bitmap OutputDeviceTestPixel::setupRectangle(bool bEnableAA)
     return mpVirtualDevice->GetBitmap(maVDRectangle.TopLeft(), maVDRectangle.GetSize());
 }
 
+Bitmap OutputDeviceTestPixel::setupRectangleOnSize1028()
+{
+    initialSetup(1028, 1028, constBackgroundColor);
+
+    mpVirtualDevice->SetLineColor(constLineColor);
+    mpVirtualDevice->SetFillColor();
+
+    drawPixelOffset(*mpVirtualDevice, maVDRectangle, 2);
+    drawPixelOffset(*mpVirtualDevice, maVDRectangle, 5);
+
+    return mpVirtualDevice->GetBitmap(maVDRectangle.TopLeft(), maVDRectangle.GetSize());
+}
+
+Bitmap OutputDeviceTestPixel::setupRectangleOnSize4096()
+{
+    initialSetup(4096, 4096, constBackgroundColor);
+
+    mpVirtualDevice->SetLineColor(constLineColor);
+    mpVirtualDevice->SetFillColor();
+
+    drawPixelOffset(*mpVirtualDevice, maVDRectangle, 2);
+    drawPixelOffset(*mpVirtualDevice, maVDRectangle, 5);
+
+    return mpVirtualDevice->GetBitmap(maVDRectangle.TopLeft(), maVDRectangle.GetSize());
+}
+
 } // end namespace vcl::test
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/backendtest/outputdevice/polygon.cxx b/vcl/backendtest/outputdevice/polygon.cxx
index 82593bc432c8..fdc15bc54214 100644
--- a/vcl/backendtest/outputdevice/polygon.cxx
+++ b/vcl/backendtest/outputdevice/polygon.cxx
@@ -211,6 +211,33 @@ Bitmap OutputDeviceTestPolygon::setupFilledAsymmetricalDropShape()
 
     return mpVirtualDevice->GetBitmap(maVDRectangle.TopLeft(), maVDRectangle.GetSize());
 }
+
+Bitmap OutputDeviceTestPolygon::setupRectangleOnSize1028()
+{
+    initialSetup(1028, 1028, constBackgroundColor);
+
+    mpVirtualDevice->SetLineColor(constLineColor);
+    mpVirtualDevice->SetFillColor();
+
+    drawPolygonOffset(*mpVirtualDevice, maVDRectangle, 2);
+    drawPolygonOffset(*mpVirtualDevice, maVDRectangle, 5);
+
+    return mpVirtualDevice->GetBitmap(maVDRectangle.TopLeft(), maVDRectangle.GetSize());
+}
+
+Bitmap OutputDeviceTestPolygon::setupRectangleOnSize4096()
+{
+    initialSetup(4096, 4096, constBackgroundColor);
+
+    mpVirtualDevice->SetLineColor(constLineColor);
+    mpVirtualDevice->SetFillColor();
+
+    drawPolygonOffset(*mpVirtualDevice, maVDRectangle, 2);
+    drawPolygonOffset(*mpVirtualDevice, maVDRectangle, 5);
+
+    return mpVirtualDevice->GetBitmap(maVDRectangle.TopLeft(), maVDRectangle.GetSize());
+}
+
 } // end namespace vcl::test
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/backendtest/outputdevice/polyline.cxx b/vcl/backendtest/outputdevice/polyline.cxx
index 41468ccee263..82450c82d67c 100644
--- a/vcl/backendtest/outputdevice/polyline.cxx
+++ b/vcl/backendtest/outputdevice/polyline.cxx
@@ -185,6 +185,33 @@ Bitmap OutputDeviceTestPolyLine::setupClosedBezier()
 
     return mpVirtualDevice->GetBitmap(maVDRectangle.TopLeft(), maVDRectangle.GetSize());
 }
+
+Bitmap OutputDeviceTestPolyLine::setupRectangleOnSize1028()
+{
+    initialSetup(1028, 1028, constBackgroundColor);
+
+    mpVirtualDevice->SetLineColor(constLineColor);
+    mpVirtualDevice->SetFillColor();
+
+    drawPolyLineOffset(*mpVirtualDevice, maVDRectangle, 2);
+    drawPolyLineOffset(*mpVirtualDevice, maVDRectangle, 5);
+
+    return mpVirtualDevice->GetBitmap(maVDRectangle.TopLeft(), maVDRectangle.GetSize());
+}
+
+Bitmap OutputDeviceTestPolyLine::setupRectangleOnSize4096()
+{
+    initialSetup(4096, 4096, constBackgroundColor);
+
+    mpVirtualDevice->SetLineColor(constLineColor);
+    mpVirtualDevice->SetFillColor();
+
+    drawPolyLineOffset(*mpVirtualDevice, maVDRectangle, 2);
+    drawPolyLineOffset(*mpVirtualDevice, maVDRectangle, 5);
+
+    return mpVirtualDevice->GetBitmap(maVDRectangle.TopLeft(), maVDRectangle.GetSize());
+}
+
 } // end namespace vcl::test
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/backendtest/outputdevice/polyline_b2d.cxx b/vcl/backendtest/outputdevice/polyline_b2d.cxx
index d3b4d5158007..9204188b6f58 100644
--- a/vcl/backendtest/outputdevice/polyline_b2d.cxx
+++ b/vcl/backendtest/outputdevice/polyline_b2d.cxx
@@ -135,6 +135,32 @@ Bitmap OutputDeviceTestPolyLineB2D::setupHalfEllipse(bool aEnableAA)
     return mpVirtualDevice->GetBitmap(maVDRectangle.TopLeft(), maVDRectangle.GetSize());
 }
 
+Bitmap OutputDeviceTestPolyLineB2D::setupRectangleOnSize1028()
+{
+    initialSetup(1028, 1028, constBackgroundColor);
+
+    mpVirtualDevice->SetLineColor(constLineColor);
+    mpVirtualDevice->SetFillColor();
+
+    drawPolyLineOffset(*mpVirtualDevice, maVDRectangle, 2);
+    drawPolyLineOffset(*mpVirtualDevice, maVDRectangle, 5);
+
+    return mpVirtualDevice->GetBitmap(maVDRectangle.TopLeft(), maVDRectangle.GetSize());
+}
+
+Bitmap OutputDeviceTestPolyLineB2D::setupRectangleOnSize4096()
+{
+    initialSetup(4096, 4096, constBackgroundColor);
+
+    mpVirtualDevice->SetLineColor(constLineColor);
+    mpVirtualDevice->SetFillColor();
+
+    drawPolyLineOffset(*mpVirtualDevice, maVDRectangle, 2);
+    drawPolyLineOffset(*mpVirtualDevice, maVDRectangle, 5);
+
+    return mpVirtualDevice->GetBitmap(maVDRectangle.TopLeft(), maVDRectangle.GetSize());
+}
+
 } // end namespace vcl::test
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/backendtest/outputdevice/polypolygon.cxx b/vcl/backendtest/outputdevice/polypolygon.cxx
index 36252485d913..4233e997bef4 100644
--- a/vcl/backendtest/outputdevice/polypolygon.cxx
+++ b/vcl/backendtest/outputdevice/polypolygon.cxx
@@ -152,6 +152,38 @@ Bitmap OutputDeviceTestPolyPolygon::setupIntersectingRectangles()
     return mpVirtualDevice->GetBitmap(maVDRectangle.TopLeft(), maVDRectangle.GetSize());
 }
 
+Bitmap OutputDeviceTestPolyPolygon::setupRectangleOnSize1028()
+{
+    initialSetup(1028, 1028, constBackgroundColor);
+
+    mpVirtualDevice->SetLineColor(constLineColor);
+    mpVirtualDevice->SetFillColor();
+
+    tools::PolyPolygon aPolyPolygon(2);
+    aPolyPolygon.Insert(createPolygonOffset(maVDRectangle, 2));
+    aPolyPolygon.Insert(createPolygonOffset(maVDRectangle, 5));
+
+    mpVirtualDevice->DrawPolyPolygon(aPolyPolygon);
+
+    return mpVirtualDevice->GetBitmap(maVDRectangle.TopLeft(), maVDRectangle.GetSize());
+}
+
+Bitmap OutputDeviceTestPolyPolygon::setupRectangleOnSize4096()
+{
+    initialSetup(4096, 4096, constBackgroundColor);
+
+    mpVirtualDevice->SetLineColor(constLineColor);
+    mpVirtualDevice->SetFillColor();
+
+    tools::PolyPolygon aPolyPolygon(2);
+    aPolyPolygon.Insert(createPolygonOffset(maVDRectangle, 2));
+    aPolyPolygon.Insert(createPolygonOffset(maVDRectangle, 5));
+
+    mpVirtualDevice->DrawPolyPolygon(aPolyPolygon);
+
+    return mpVirtualDevice->GetBitmap(maVDRectangle.TopLeft(), maVDRectangle.GetSize());
+}
+
 } // end namespace vcl::test
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/backendtest/outputdevice/polypolygon_b2d.cxx b/vcl/backendtest/outputdevice/polypolygon_b2d.cxx
index c3aa44e78071..5695920a4a32 100644
--- a/vcl/backendtest/outputdevice/polypolygon_b2d.cxx
+++ b/vcl/backendtest/outputdevice/polypolygon_b2d.cxx
@@ -142,6 +142,38 @@ Bitmap OutputDeviceTestPolyPolygonB2D::setupIntersectingRectangles()
     return mpVirtualDevice->GetBitmap(maVDRectangle.TopLeft(), maVDRectangle.GetSize());
 }
 
+Bitmap OutputDeviceTestPolyPolygonB2D::setupRectangleOnSize1028()
+{
+    initialSetup(1028, 1028, constBackgroundColor);
+
+    mpVirtualDevice->SetLineColor(constLineColor);
+    mpVirtualDevice->SetFillColor();
+
+    basegfx::B2DPolyPolygon aPolyPolygon;
+    aPolyPolygon.append(createPolygonOffset(maVDRectangle, 2));
+    aPolyPolygon.append(createPolygonOffset(maVDRectangle, 5));
+
+    mpVirtualDevice->DrawPolyPolygon(aPolyPolygon);
+
+    return mpVirtualDevice->GetBitmap(maVDRectangle.TopLeft(), maVDRectangle.GetSize());
+}
+
+Bitmap OutputDeviceTestPolyPolygonB2D::setupRectangleOnSize4096()
+{
+    initialSetup(4096, 4096, constBackgroundColor);
+
+    mpVirtualDevice->SetLineColor(constLineColor);
+    mpVirtualDevice->SetFillColor();
+
+    basegfx::B2DPolyPolygon aPolyPolygon;
+    aPolyPolygon.append(createPolygonOffset(maVDRectangle, 2));
+    aPolyPolygon.append(createPolygonOffset(maVDRectangle, 5));
+
+    mpVirtualDevice->DrawPolyPolygon(aPolyPolygon);
+
+    return mpVirtualDevice->GetBitmap(maVDRectangle.TopLeft(), maVDRectangle.GetSize());
+}
+
 } // end namespace vcl::test
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/backendtest/outputdevice/rectangle.cxx b/vcl/backendtest/outputdevice/rectangle.cxx
index 1401a39e1695..d202687d35e8 100644
--- a/vcl/backendtest/outputdevice/rectangle.cxx
+++ b/vcl/backendtest/outputdevice/rectangle.cxx
@@ -109,6 +109,32 @@ Bitmap OutputDeviceTestRect::setupInvert_TrackFrame()
     return mpVirtualDevice->GetBitmap(maVDRectangle.TopLeft(), maVDRectangle.GetSize());
 }
 
+Bitmap OutputDeviceTestRect::setupRectangleOnSize1028()
+{
+    initialSetup(1028, 1028, constBackgroundColor);
+
+    mpVirtualDevice->SetLineColor(constLineColor);
+    mpVirtualDevice->SetFillColor();
+
+    drawRectOffset(*mpVirtualDevice, maVDRectangle, 2);
+    drawRectOffset(*mpVirtualDevice, maVDRectangle, 5);
+
+    return mpVirtualDevice->GetBitmap(maVDRectangle.TopLeft(), maVDRectangle.GetSize());
+}
+
+Bitmap OutputDeviceTestRect::setupRectangleOnSize4096()
+{
+    initialSetup(4096, 4096, constBackgroundColor);
+
+    mpVirtualDevice->SetLineColor(constLineColor);
+    mpVirtualDevice->SetFillColor();
+
+    drawRectOffset(*mpVirtualDevice, maVDRectangle, 2);
+    drawRectOffset(*mpVirtualDevice, maVDRectangle, 5);
+
+    return mpVirtualDevice->GetBitmap(maVDRectangle.TopLeft(), maVDRectangle.GetSize());
+}
+
 } // end namespace vcl::test
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/inc/test/outputdevice.hxx b/vcl/inc/test/outputdevice.hxx
index 67ae1be876b1..d0f273847d25 100644
--- a/vcl/inc/test/outputdevice.hxx
+++ b/vcl/inc/test/outputdevice.hxx
@@ -138,6 +138,8 @@ public:
     OutputDeviceTestPixel() = default;
 
     Bitmap setupRectangle(bool bEnableAA);
+    Bitmap setupRectangleOnSize1028();
+    Bitmap setupRectangleOnSize4096();
 };
 
 class VCL_DLLPUBLIC OutputDeviceTestLine : public OutputDeviceTestCommon
@@ -146,6 +148,8 @@ public:
     OutputDeviceTestLine() = default;
 
     Bitmap setupRectangle(bool bEnableAA);
+    Bitmap setupRectangleOnSize1028();
+    Bitmap setupRectangleOnSize4096();
     Bitmap setupDiamond();
     Bitmap setupLines();
     Bitmap setupAALines();
@@ -179,6 +183,8 @@ public:
     Bitmap setupAADropShape();
     Bitmap setupHalfEllipse(bool aEnableAA = false);
     Bitmap setupClosedBezier();
+    Bitmap setupRectangleOnSize1028();
+    Bitmap setupRectangleOnSize4096();
 };
 
 class VCL_DLLPUBLIC OutputDeviceTestPolyLineB2D : public OutputDeviceTestCommon
@@ -191,6 +197,8 @@ public:
     Bitmap setupBezier();
     Bitmap setupAABezier();
     Bitmap setupHalfEllipse(bool aEnableAA = false);
+    Bitmap setupRectangleOnSize1028();
+    Bitmap setupRectangleOnSize4096();
 };
 
 class VCL_DLLPUBLIC OutputDeviceTestRect : public OutputDeviceTestCommon
@@ -200,6 +208,8 @@ public:
 
     Bitmap setupRectangle(bool bEnableAA);
     Bitmap setupFilledRectangle(bool useLineColor);
+    Bitmap setupRectangleOnSize1028();
+    Bitmap setupRectangleOnSize4096();
     Bitmap setupInvert_NONE();
     Bitmap setupInvert_N50();
     Bitmap setupInvert_TrackFrame();
@@ -220,6 +230,8 @@ public:
     Bitmap setupHalfEllipse(bool aEnableAA = false);
     Bitmap setupClosedBezier();
     Bitmap setupFilledAsymmetricalDropShape();
+    Bitmap setupRectangleOnSize1028();
+    Bitmap setupRectangleOnSize4096();
 };
 
 class VCL_DLLPUBLIC OutputDeviceTestPolyPolygon : public OutputDeviceTestCommon
@@ -230,6 +242,8 @@ public:
     Bitmap setupRectangle(bool bEnableAA);
     Bitmap setupFilledRectangle(bool useLineColor);
     Bitmap setupIntersectingRectangles();
+    Bitmap setupRectangleOnSize1028();
+    Bitmap setupRectangleOnSize4096();
 };
 
 class VCL_DLLPUBLIC OutputDeviceTestPolyPolygonB2D : public OutputDeviceTestCommon
@@ -240,6 +254,8 @@ public:
     Bitmap setupRectangle(bool bEnableAA);
     Bitmap setupFilledRectangle(bool useLineColor);
     Bitmap setupIntersectingRectangles();
+    Bitmap setupRectangleOnSize1028();
+    Bitmap setupRectangleOnSize4096();
 };
 
 class VCL_DLLPUBLIC OutputDeviceTestGradient : public OutputDeviceTestCommon


More information about the Libreoffice-commits mailing list