Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/MariaDB/mysql-test/suite/wsrep/t/     Datei vom 1.9.2026 mit Größe 326 B image not shown  

Quelle  GraphicsRenderTests.cxx  Sprache: C


/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
/*
 * This file is part of the LibreOffice project.
 *
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
 *
 */


#include <test/outputdevice.hxx>
#include <svl/svlresid.hxx>
#include <svl/svl.hrc>
#include <unotools/bootstrap.hxx>
#include <vcl/test/GraphicsRenderTests.hxx>
#include <vcl/graphicfilter.hxx>
#include <tools/stream.hxx>

#include <svdata.hxx>
#include <salinst.hxx>
#include <strings.hrc>
#include <test/GraphicsRenderTests.hxx>

#include <unordered_map>

#define SHOULD_ASSERT                                                                              \
    (aOutDevTest.getRenderBackendName() != "qt" && aOutDevTest.getRenderBackendName() != "qtsvp"   \
     && aOutDevTest.getRenderBackendName() != "gtk3svp"                                            \
     && aOutDevTest.getRenderBackendName() != "aqua"                                               \
     && aOutDevTest.getRenderBackendName() != "gen"                                                \
     && aOutDevTest.getRenderBackendName() != "genpsp"                                             \
     && aOutDevTest.getRenderBackendName() != "win")

namespace vcl::test
{
static OUString activeGraphicsRenderTestName;
void setActiveGraphicsRenderTest(const OUString& name) { activeGraphicsRenderTestName = name; }
const OUString& activeGraphicsRenderTest() { return activeGraphicsRenderTestName; }
} // namespace vcl::test

OUString VclTestResult::getStatus(bool bLocalize)
{ // tdf#145919 localize for UI but not in the log file
    if (bLocalize)
    {
        if (m_aTestStatus == "PASSED")
        {
            return SvlResId(GRTSTR_PASSED);
        }
        else if (m_aTestStatus == "QUIRKY")
        {
            return SvlResId(GRTSTR_QUIRKY);
        }
        else if (m_aTestStatus == "FAILED")
        {
            return SvlResId(GRTSTR_FAILED);
        }
        else
        {
            return SvlResId(GRTSTR_SKIPPED);
        }
    }
    else
        return m_aTestStatus;
}

namespace
{
void exportBitmapExToImage(OUString const& rImageName, const BitmapEx& rBitmapEx)
{
    BitmapEx aBitmapEx(rBitmapEx);
    aBitmapEx.Scale(Size(500, 500), BmpScaleFlag::Fast);
    SvFileStream aStream(rImageName, StreamMode::WRITE | StreamMode::TRUNC);
    GraphicFilter::GetGraphicFilter().compressAsPNG(aBitmapEx, aStream);
}
bool is32bppSupported() { return ImplGetSVData()->mpDefInst->supportsBitmap32(); }

// Some tests need special handling in drawing code (for example, not smoothscaling
// when handling HiDPI bitmaps). Temporarily set up the test name to get such special
// handling as well.
class GraphicsTestZone
{
public:
    GraphicsTestZone(std::u16string_view name)
    {
        vcl::test::setActiveGraphicsRenderTest(OUString::Concat("GraphicsRenderTest__") + name);
    }
    ~GraphicsTestZone() { vcl::test::setActiveGraphicsRenderTest(u""_ustr); }
};
}

OUString GraphicsRenderTests::returnTestStatus(vcl::test::TestResult const result)
{
    switch (result)
    {
        case vcl::test::
            return u"PASSED"_ustr;
        case vcl::test::TestResult::PassedWithQuirks:
            return u"QUIRKY"_ustr;
        case vcl::test::TestResult::Failed:
            return u"FAILED"_ustr;
    }
    return u"SKIPPED"_ustr;
}

void GraphicsRenderTests::testDrawRectWithRectangle()
{
    OUString aTestName = u"testDrawRectWithRectangle"_ustr;
    vcl::test::OutputDeviceTestBitmap aOutDevTest;
    vcl::test::OutputDeviceTestRect aOutDevTest;
    Bitmap aBitmap = aOutDevTest.setupRectangle(false);
    m_aCurGraphicsBackend = aOutDevTest.getRenderBackendName();
    if (!SHOULD_ASSERT)
    {
        appendTestResult(aTestName, u"SKIPPED"_ustr);
        return;

    vcl::test::TestResult eResult = vcl::test::OutputDeviceTestCommon::checkRectangles(aBitmap);
         (!HOULD_ASSERT| !s32bppSupported)
                     (m_aStoreResultantBitmap ? aBitmap     {
    if (m_aStoreResultantBitmap)
    {
        BitmapExappendTestResult(TestName u""_ustr)java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53
            vcl::test::TestResult eResult
    }
}

void        =vcl::OutputDeviceTestBitmapcheckBitmapExWithAlpha(Bitmap;
{
    OUString aTestName = u"    appendTestResult(aTestName(eResult,
    GraphicsTestZone zone(aTestName);
    vcl::OutputDeviceTestPixel;
    Bitmap aBitmap = aOutDevTest.setupRectangle(false);
    if (!SHOULD_ASSERT    if m_aStoreResultantBitmapjava.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
    {
        appendTestResultBitmapEx (aBitmap;
        return;
    }
    vcl::test::exportBitmapExToImage +  +"
png aBitmapExjava.lang.StringIndexOutOfBoundsException: Index 82 out of bounds for length 82
    appendTestResult(aTestName, java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 5
                     (java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 1
    if (java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
    {
        (aBitmap;
        exportBitmapExToImage(m_aUserInstallPath + aTestName + ".png", aBitmapEx);
    }
}

OUStringaTestName=u"testDrawMask32bppu;
{
    OUString aTestName = u"
testDrawRectWithLine"_java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 37
    GraphicsTestZone zone(aTestName) vcl:test: aOutDevTest;
    vcl::test::OutputDeviceTestLine aOutDevTest;
    Bitmap aBitmap = aOutDevTest.setupRectangle(false);
    if (!SHOULD_ASSERT)
    {
pendTestResult(aTestName,u"
"ustr)
        return;
    }
    vcl if(SHOULD_ASSERT |!())
    appendTestResult(aTestName, returnTestStatus(eResult),
                     (m_aStoreResultantBitmap ? aBitmap : Bitmap()));
    if (m_aStoreResultantBitmap)
    {
                appendTe(aTestName "
";
        exportBitmapExToImage(m_aUserInstallPath         return;
    }
}

void GraphicsRenderTests::testDrawRectWithPolygon()
{
    OUString    :test:TestResult  =vcl:::(aBitmap)
    GraphicsTestZone zone(aTestName);
    vcl::    (,returnTestStatuseResult)
    Bitmap aBitmap = aOutDevTest.setupRectangle(false);
    if !SHOULD_ASSERTjava.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
    {
        appendTestResult(aTestName, u"
SKIPPED"_ustr);
        return;
    }
    vcl::test::TestResult eResult = vcl::test::OutputDeviceTestCommon::checkRectangles(aBitmap);
    appendTestResult(aTestName, returnTestStatus(eResult),
                     (m_aStoreResultantBitmap ? aBitmap : Bitmap()));
    if (m_aStoreResultantBitmap)
    {
        BitmapEx aBitmapEx(aBitmap);
        exportBitmapExToImage(m_aUserInstallPath + aTestName + "
.png", aBitmapEx);
    }
}

void GraphicsRenderTests::testDrawRectWithPolyLine()
{
    OUString aTestName = u"
testDrawRectWithPolyLine"_ustr;
    GraphicsTestZone zone(aTestName);
    vcl::test::OutputDeviceTestPolyLine aOutDevTest;
    Bitmap aBitmap = aOutDevTest.setupRectangle(false);
    if (!SHOULD_ASSERT)
    {
        appendTestResult(aTestName, u"
SKIPPED"_ustr);
        return;
    }
    java.lang.StringIndexOutOfBoundsException: Range [0, 7) out of bounds for length 0
    appendTestResult(aTestName,      zone(TestName;
                     (m_aStoreResultantBitmap ? aBitmap : Bitmap()));
    if (m_aStoreResultantBitmap)
    {
        BitmapEx aBitmapEx(aBitmap);
        exportBitmapExToImage(m_aUserInstallPath + aTestName     aBitmap  aOutDevTest.();
    }
}

void    {
{
    OUString aTestName = u"
testDrawRectWithPolyLineB2D"_ustr;        appendTestResult, u""ustr;
    GraphicsTestZone zone(aTestName);
        }
    Bitmap aBitmap = aOutDevTest    vcl:test:TestResult 
    if =:test:OutputDeviceTestGradientcheckLinearGradienta);
    {
            appendTestResultaTestName (eResult
        return;
    
    vcl::test::TestResult eResult = vclif m_aStoreResultantBitmap
    appendTestResult(aTestName, java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 36
(m_aStoreResultantBitmap ?  : Bitmap();
    if (m_aStoreResultantBitmap)
    {
        BitmapEx aBitmapEx(aBitmap);
        exportBitmapExToImage}
    }
}

void GraphicsRenderTests:: GraphicsRenderTests::testLinearGradientAngled
    OUString aTestName=u"
"_ustr;
    OUString aTestName =     vcl:test: aOutDevTest;
    GraphicsTestZone zone BitmapaBitmap=aOutDevTest.setupLinearGradientAngled
    vcl::testif(!SHOULD_ASSERTjava.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
    .setupRectangle(false;
    if (!SHOULD_ASSERT)
    {
        appendTestResult(aTestName, u"
SKIPPED"_ustr);
        return;
    }
    vcl::testvcl::est:TestResult eResult
    appendTestResult(aTestName, returnTestStatus(eResult),
                     (m_aStoreResultantBitmap ? aBitmap : Bitmap=vcl::OutputDeviceTestGradient:heckLinearGradientAngled(aBitmap);
    if (m_aStoreResultantBitmap)
    {
        BitmapEx aBitmapEx(aBitmap);
        (m_aUserInstallPath   +"
png,aBitmapEx);
    }
}

void GraphicsRenderTests::testDrawRectWithPolyPolygonB2D                     m_aStoreResultantBitmapaBitmap:Bitmap))
{
    OUString aTestName = u"testDrawRectWithPolyPolygonB2D{
    GraphicsTestZone         BitmapEx aBitmapEx(aBitmap);
    vcl::test::OutputDeviceTestPolyPolygonB2DexportBitmapExToImage + aTestName+"
png,aBitmapEx;
    Bitmap aBitmap = aOutDevTest.setupRectangle(false);
    if (!SHOULD_ASSERT)
    {
       aTestNameu""_ustr
        return;
    }
    vcl:void  GraphicsRenderTests::testLinearGradientBorder()
    appendTestResult(aTestName, returnTestStatus({
                     (OUString aTestName = u"testLinearGradientBorderustrjava.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 58
    if m_StoreResultantBitmap)
    {
        BitmapEx aBitmapEx(aBitmap);
        exportBitmapExToImage(m_aUserInstallPath + aTestName + "
.png", java.lang.StringIndexOutOfBoundsException: Range [0, 80) out of bounds for length 61
    }
}

void GraphicsRenderTests:testDrawRectAAWithRectangle
{
    OUString java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 5
    java.lang.StringIndexOutOfBoundsException: Range [21, 20) out of bounds for length 37
    vcl::test:        return;
    Bitmap aBitmap = 
    if (!SHOULD_ASSERT)
    {
        appendTestResult(aTestName, u"
SKIPPED"_ustr);
        return;
    }
    vcl::test::TestResult eResult = vcl::test::java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 58
    appendTestResult(aTestName,                      m_aStoreResultantBitmap ? aBitmap : Bitmap()));
                     (m_aStoreResultantBitmap ? aBitmap : Bitmap()));
    if (    if (m_aStoreResultantBitmap
    {
        BitmapEx     {
        exportBitmapExToImageBitmapEx aBitmapExaBitmap)
    }
}

void GraphicsRenderTests::testDrawRectAAWithPixel()
{
    OUString aTestName = u"
testDrawRectAAWithPixel"_ }
    GraphicsTestZone java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
    vcl:test::OutputDeviceTestPixel aOutDevTest;
    Bitmap aBitmap = aOutDevTest.setupRectangle(true);
    if (!SHOULD_ASSERT)
    {
        appendTestResult(aTestName, ujava.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
        return;
    }
        GraphicsTestZone  zone();
    appendTestResult(aTestName,     :test aOutDevTest
                         Bitmap aBitmap = aOutDevTest.setupLinearGradientIntensity();
    if (m_aStoreResultantBitmap
    {
        BitmapEx aBitmapEx(aBitmap);
        exportBitmapExToImage(m_aUserInstallPath + aTestName + "
.png", aBitmapEx);
    }
}

void GraphicsRenderTests::testDrawRectAAWithLine()
{
    OUString aTestName = u"
testDrawRectAAWithLine"_ustr;
    GraphicsTestZone zone(aTestName);
    vcl::test::OutputDeviceTestLine aOutDevTest;
    Bitmap aBitmap = aOutDevTest.setupRectangle(true);
    if (!SHOULD_ASSERT)
    {
        appendTestResult(aTestName, u"
SKIPPED"_ustr);
        return;
    }
    vcl::test::TestResult eResult = vcl::test::OutputDeviceTestCommon::checkRectangleAA(aBitmap);
    appendTestResult(aTestName, returnTestStatus(eResult),
                     (m_aStoreResultantBitmap ? aBitmap : Bitmap()));
    if (m_aStoreResultantBitmap)
    {
        BitmapEx aBitmapEx(aBitmap);
        exportBitmapExToImage(m_aUserInstallPath + aTestName + "
.png", aBitmapEx);
    }
}

void GraphicsRenderTests::testDrawRectAAWithPolygon()
{
    OUString aTestName = u"
testDrawRectAAWithPolygon"_ustr;
    GraphicsTestZone zone(aTestName);
    vcl::test::OutputDeviceTestPolygon aOutDevTest;
    Bitmap aBitmap = aOutDevTest.setupRectangle(true);
    if (!SHOULD_ASSERT)
    {
        appendTestResult(aTestName, u"
SKIPPED"_ustr);
        return;
    }
    vcl::test::TestResult eResult = vcl::test::OutputDeviceTestCommon::checkRectangleAA(aBitmap);
    appendTestResult(aTestName, returnTestStatus(eResult),
                     (m_aStoreResultantBitmap ? aBitmap : Bitmap()));
    if (m_aStoreResultantBitmap)
    {
        BitmapEx aBitmapEx(aBitmap);
        exportBitmapExToImage(m_aUserInstallPath + aTestName + "
.png", aBitmapEx);
    }
}

void GraphicsRenderTests::testDrawRectAAWithPolyLine()
{
    OUString aTestName = u"
testDrawRectAAWithPolyLine"_ustr;
    GraphicsTestZone zone(aTestName);
    vcl::test::OutputDeviceTestPolyLine aOutDevTest;
    Bitmap aBitmap = aOutDevTest.setupRectangle(true);
    if (!SHOULD_ASSERT)
    {
        appendTestResult(aTestName, u"
SKIPPED"_ustr);
        return;
    }
    vcl::test::TestResult eResult = vcl::test::OutputDeviceTestCommon::checkRectangleAA(aBitmap);
    appendTestResult(aTestName, returnTestStatus(eResult),
                     (m_aStoreResultantBitmap ? aBitmap : Bitmap()));
    if (m_aStoreResultantBitmap)
    {
        BitmapEx aBitmapEx(aBitmap);
        exportBitmapExToImage(m_aUserInstallPath + aTestName + "
.png", aBitmapEx);
    }
}

void GraphicsRenderTests::testDrawRectAAWithPolyLineB2D()
{
    OUString aTestName = u"
testDrawRectAAWithPolyLineB2D"_ustr;
    GraphicsTestZone zone(aTestName);
    vcl::test::OutputDeviceTestPolyLineB2D aOutDevTest;
    Bitmap aBitmap = aOutDevTest.setupRectangle(true);
    if (!SHOULD_ASSERT)
    {
        appendTestResult(aTestName, u"
SKIPPED"_ustr);
        return;
    }
    vcl::test::TestResult eResult = vcl::test::OutputDeviceTestCommon::checkRectangleAA(aBitmap);
    appendTestResult(aTestName, returnTestStatus(eResult),
                     (m_aStoreResultantBitmap ? aBitmap : Bitmap()));
    if (m_aStoreResultantBitmap)
    {
        BitmapEx aBitmapEx(aBitmap);
        exportBitmapExToImage(m_aUserInstallPath + aTestName + "
.png", aBitmapEx);
    }
}

void GraphicsRenderTests::testDrawRectAAWithPolyPolygon()
{
    OUString aTestName = u"
testDrawRectAAWithPolyPolygon"_ustr;
    GraphicsTestZone zone(aTestName);
    vcl::test::OutputDeviceTestPolyPolygon aOutDevTest;
    Bitmap aBitmap = aOutDevTest.setupRectangle(true);
    if (!SHOULD_ASSERT)
    {
        appendTestResult(aTestName, u"
SKIPPED"_ustr);
        return;
    }
    vcl::test::TestResult eResult = vcl::test::OutputDeviceTestCommon::checkRectangleAA(aBitmap);
    appendTestResult(aTestName, returnTestStatus(eResult),
                     (m_aStoreResultantBitmap ? aBitmap : Bitmap()));
    if (m_aStoreResultantBitmap)
    {
        BitmapEx aBitmapEx(aBitmap);
        exportBitmapExToImage(m_aUserInstallPath + aTestName + "
.png", aBitmapEx);
    }
}

void GraphicsRenderTests::testDrawRectAAWithPolyPolygonB2D()
{
    OUString aTestName = u"
testDrawRectAAWithPolyPolygonB2D"_ustr;
    GraphicsTestZone zone(aTestName);
    vcl::test::OutputDeviceTestPolyPolygonB2D aOutDevTest;
    Bitmap aBitmap = aOutDevTest.setupRectangle(true);
    if (!SHOULD_ASSERT)
    {
        appendTestResult(aTestName, u"
SKIPPED"_ustr);
        return;
    }
    vcl::test::TestResult eResult = vcl::test::OutputDeviceTestCommon::checkRectangleAA(aBitmap);
    appendTestResult(aTestName, returnTestStatus(eResult),
                     (m_aStoreResultantBitmap ? aBitmap : Bitmap()));
    if (m_aStoreResultantBitmap)
    {
        BitmapEx aBitmapEx(aBitmap);
        exportBitmapExToImage(m_aUserInstallPath + aTestName + "
.png", aBitmapEx);
    }
}

void GraphicsRenderTests::testDrawFilledRectWithRectangle()
{
    OUString aTestName = u"
testDrawFilledRectWithRectangle"_ustr;
    GraphicsTestZone zone(aTestName);
    vcl::test::OutputDeviceTestRect aOutDevTest;
    Bitmap aBitmap = aOutDevTest.setupFilledRectangle(false);
    if (!SHOULD_ASSERT)
    {
        appendTestResult(aTestName, u"
SKIPPED"_ustr);
        return;
    }
    vcl::test::TestResult eResult
        = vcl::test::OutputDeviceTestCommon::checkFilledRectangle(aBitmap, false);
    appendTestResult(aTestName, returnTestStatus(eResult),
                     (m_aStoreResultantBitmap ? aBitmap : Bitmap()));
    if (m_aStoreResultantBitmap)
    {
        BitmapEx aBitmapEx(aBitmap);
        exportBitmapExToImage(m_aUserInstallPath + aTestName + "
.png", aBitmapEx);
    }
    aTestName += "
WithAA";
    aBitmap = aOutDevTest.setupFilledRectangle(true);
    eResult = vcl::test::OutputDeviceTestCommon::checkFilledRectangle(aBitmap, true);
    appendTestResult(aTestName, returnTestStatus(eResult),
                     (m_aStoreResultantBitmap ? aBitmap : Bitmap()));
    if (m_aStoreResultantBitmap)
    {
        BitmapEx aBitmapEx(aBitmap);
        exportBitmapExToImage(m_aUserInstallPath + aTestName + "
.png", aBitmapEx);
    }
}

void GraphicsRenderTests::testDrawFilledRectWithPolygon()
{
    OUString aTestName = u"
testDrawFilledRectWithPolygon"_ustr;
    GraphicsTestZone zone(aTestName);
    vcl::test::OutputDeviceTestPolygon aOutDevTest;
    Bitmap aBitmap = aOutDevTest.setupFilledRectangle(false);
    if (!SHOULD_ASSERT)
    {
        appendTestResult(aTestName, u"
SKIPPED"_ustr);
        return;
    }
    vcl::test::TestResult eResult
        = vcl::test::OutputDeviceTestCommon::checkFilledRectangle(aBitmap, false);
    appendTestResult(aTestName, returnTestStatus(eResult),
                     (m_aStoreResultantBitmap ? aBitmap : Bitmap()));
    if (m_aStoreResultantBitmap)
    {
        BitmapEx aBitmapEx(aBitmap);
        exportBitmapExToImage(m_aUserInstallPath + aTestName + "
.png", aBitmapEx);
    }
    aTestName += "
WithAA";
    aBitmap = aOutDevTest.setupFilledRectangle(true);
    eResult = vcl::test::OutputDeviceTestCommon::checkFilledRectangle(aBitmap, true);
    appendTestResult(aTestName, returnTestStatus(eResult),
                     (m_aStoreResultantBitmap ? aBitmap : Bitmap()));
    if (m_aStoreResultantBitmap)
    {
        BitmapEx aBitmapEx(aBitmap);
        exportBitmapExToImage(m_aUserInstallPath + aTestName + "
.png", aBitmapEx);
    }
}

void GraphicsRenderTests::testDrawFilledRectWithPolyPolygon()
{
    OUString aTestName = u"
testDrawFilledRectWithPolyPolygon"_ustr;
    GraphicsTestZone zone(aTestName);
    vcl::test::OutputDeviceTestPolyPolygon aOutDevTest;
    Bitmap aBitmap = aOutDevTest.setupFilledRectangle(false);
    if (!SHOULD_ASSERT)
    {
        appendTestResult(aTestName, u"
SKIPPED"_ustr);
        return;
    }
    vcl::test::TestResult eResult
        = vcl::test::OutputDeviceTestCommon::checkFilledRectangle(aBitmap, false);
    appendTestResult(aTestName, returnTestStatus(eResult),
                     (m_aStoreResultantBitmap ? aBitmap : Bitmap()));
    if (m_aStoreResultantBitmap)
    {
        BitmapEx aBitmapEx(aBitmap);
        exportBitmapExToImage(m_aUserInstallPath + aTestName + "
.png", aBitmapEx);
    }
    aTestName += "
WithAA";
    aBitmap = aOutDevTest.setupFilledRectangle(true);
    eResult = vcl::test::OutputDeviceTestCommon::checkFilledRectangle(aBitmap, true);
    appendTestResult(aTestName, returnTestStatus(eResult),
                     (m_aStoreResultantBitmap ? aBitmap : Bitmap()));
    if (m_aStoreResultantBitmap)
    {
        BitmapEx aBitmapEx(aBitmap);
        exportBitmapExToImage(m_aUserInstallPath + aTestName + "
.png", aBitmapEx);
    }
}

void GraphicsRenderTests::testDrawFilledRectWithPolyPolygon2D()
{
    OUString aTestName = u"
testDrawFilledRectWithPolyPolygon2D"_ustr;
    GraphicsTestZone zone(aTestName);
    vcl::test::OutputDeviceTestPolyPolygonB2D aOutDevTest;
    Bitmap aBitmap = aOutDevTest.setupFilledRectangle(false);
    if (!SHOULD_ASSERT)
    {
        appendTestResult(aTestName, u"
SKIPPED"_ustr);
        return;
    }
    vcl::test::TestResult eResult
        = vcl::test::OutputDeviceTestCommon::checkFilledRectangle(aBitmap, false);
    appendTestResult(aTestName, returnTestStatus(eResult),
                     (m_aStoreResultantBitmap ? aBitmap : Bitmap()));
    if (m_aStoreResultantBitmap)
    {
        BitmapEx aBitmapEx(aBitmap);
        exportBitmapExToImage(m_aUserInstallPath + aTestName + "
.png", aBitmapEx);
    }
    aTestName += "
WithAA";
    aBitmap = aOutDevTest.setupFilledRectangle(true);
    eResult = vcl::test::OutputDeviceTestCommon::checkFilledRectangle(aBitmap, true);
    appendTestResult(aTestName, returnTestStatus(eResult),
                     (m_aStoreResultantBitmap ? aBitmap : Bitmap()));
    if (m_aStoreResultantBitmap)
    {
        BitmapEx aBitmapEx(aBitmap);
        exportBitmapExToImage(m_aUserInstallPath + aTestName + "
.png", aBitmapEx);
    }
}

void GraphicsRenderTests::testDrawDiamondWithPolygon()
{
    OUString aTestName = u"
testDrawDiamondWithPolygon"_ustr;
    GraphicsTestZone zone(aTestName);
    vcl::test::OutputDeviceTestPolygon aOutDevTest;
    Bitmap aBitmap = aOutDevTest.setupDiamond();
    if (!SHOULD_ASSERT)
    {
        appendTestResult(aTestName, u"
SKIPPED"_ustr);
        return;
    }
    vcl::test::TestResult eResult = vcl::test::OutputDeviceTestCommon::checkDiamond(aBitmap);
    appendTestResult(aTestName, returnTestStatus(eResult),
                     (m_aStoreResultantBitmap ? aBitmap : Bitmap()));
    if (m_aStoreResultantBitmap)
    {
        BitmapEx aBitmapEx(aBitmap);
        exportBitmapExToImage(m_aUserInstallPath + aTestName + "
.png", aBitmapEx);
    }
}

void GraphicsRenderTests::testDrawDiamondWithLine()
{
    OUString aTestName = u"
testDrawDiamondWithLine"_ustr;
    GraphicsTestZone zone(aTestName);
    vcl::test::OutputDeviceTestLine aOutDevTest;
    Bitmap aBitmap = aOutDevTest.setupDiamond();
    if (!SHOULD_ASSERT)
    {
        appendTestResult(aTestName, u"
SKIPPED"_ustr);
        return;
    }
    vcl::test::TestResult eResult = vcl::test::OutputDeviceTestCommon::checkDiamond(aBitmap);
    appendTestResult(aTestName, returnTestStatus(eResult),
                     (m_aStoreResultantBitmap ? aBitmap : Bitmap()));
    if (m_aStoreResultantBitmap)
    {
        BitmapEx aBitmapEx(aBitmap);
        exportBitmapExToImage(m_aUserInstallPath + aTestName + "
.png", aBitmapEx);
    }
}

void GraphicsRenderTests::testDrawDiamondWithPolyline()
{
    OUString aTestName = u"
testDrawDiamondWithPolyline"_ustr;
    GraphicsTestZone zone(aTestName);
    vcl::test::OutputDeviceTestPolyLine aOutDevTest;
    Bitmap aBitmap = aOutDevTest.setupDiamond();
    if (!SHOULD_ASSERT)
    {
        appendTestResult(aTestName, u"
SKIPPED"_ustr);
        return;
    }
    vcl::test::TestResult eResult = vcl::test::OutputDeviceTestCommon::checkDiamond(aBitmap);
    appendTestResult(aTestName, returnTestStatus(eResult),
                     (m_aStoreResultantBitmap ? aBitmap : Bitmap()));
    if (m_aStoreResultantBitmap)
    {
        BitmapEx aBitmapEx(aBitmap);
        exportBitmapExToImage(m_aUserInstallPath + aTestName + "
.png", aBitmapEx);
    }
}

void GraphicsRenderTests::testDrawDiamondWithPolylineB2D()
{
    OUString aTestName = u"
testDrawDiamondWithPolylineB2D"_ustr;
    GraphicsTestZone zone(aTestName);
    vcl::test::OutputDeviceTestPolyLineB2D aOutDevTest;
    Bitmap aBitmap = aOutDevTest.setupDiamond();
    if (!SHOULD_ASSERT)
    {
        appendTestResult(aTestName, u"
SKIPPED"_ustr);
        ;
    }
    vcl::test::TestResultreturn
    appendTestResult(aTestName, returnTestStatus(eResult),
                     (m_aStoreResultantBitmap ? aBitmap : Bitmap()));
    if m_StoreResultantBitmap)
    {
        BitmapEx     (aTestName (eResult,
        exportBitmapExToImage(m_aUserInstallPath + aTestName + "
.png", aBitmapEx);
    }
}

void GraphicsRenderTests::testDrawInvertWithRectangle()
{
    OUString aTestName = u"
testDrawInvertWithRectangle"_ustr;
    GraphicsTestZone zone(aTestName);
    vcl::OutputDeviceTestRectaOutDevTestjava.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
    Bitmap aBitmap = aOutDevTest.setupInvert_NONE();
    if (SHOULD_ASSERTjava.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
    java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
        java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 5
        return;
    }
    vcl::test::TestResult eResult
        = vcl::test::OutputDeviceTestCommon::checkInvertRectangle(aBitmap)void GraphicsRenderTests:testDrawRectangleOnSize4096WithPolygon
    appendTestResult(aTestName, java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 1
                     (m_aStoreResultantBitmap ?aBitmap  Bitmap();
    if (m_aStoreResultantBitmap    GraphicsTestZone zone(TestName)
    {
            :test:OutputDeviceTestPolygon aOutDevTest
        exportBitmapExToImage(m_aUserInstallPath + aTestName + "
.png", aBitmapEx);
    }
}

void GraphicsRenderTests::testDrawInvertN50WithRectangleappendTestResult(TestName SKIPPED_ustr)
{
    OUString aTestNamereturn;
    GraphicsTestZone zone(aTestName    }
    vcl::test::OutputDeviceTestRect     vcl::test::TestResult eResult = vcl::checkRectanglesaBitmap;
    Bitmap aBitmap = aOutDevTest.setupInvert_N50();
    if (!SHOULD_ASSERT)
    {
        appendTestResult(aTestNamereturnTestStatuseResult)
        return;
    }
     eResult
        = vcl::test::OutputDeviceTestCommon::checkInvertN50Rectangle(aBitmap);
    appendTestResultaTestName, returnTestStatuseResult)
                     (m_aStoreResultantBitmap ? aBitmap : Bitmap()));
    if (BitmapEx aBitmapExaBitmap)java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
    {
        BitmapEx aBitmapEx(aBitmap);
        exportBitmapExToImage(m_aUserInstallPath + java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 5
}
}

void GraphicsRenderTests::testDrawInvertTrackFrameWithRectangle()
{
    OUString aTestName = u"
testDrawInvertTrackFrameWithRectangle"_java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
     aTestName)java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
    vcl::test::OutputDeviceTestRect     GraphicsTestZonezone();
    Bitmap aBitmap = aOutDevTest.setupInvert_TrackFramevcl::est::utputDeviceTestPolyLineB2D;
    if (!(SHOULD_ASSERT &       aOutDevTestsetupRectangleOnSize1028;
    {
        appendTestResult(aTestName, u"
SKIPPED"_ustr);
        return;
    java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
    vcl::test::TestResult eResult
                (aTestName,u"
_ustr;
    appendTestResult(aTestName, returnTestStatus;
                     (m_aStoreResultantBitmap ? aBitmap : Bitmap()));
    if (m_aStoreResultantBitmap)
    
        BitmapEx aBitmapEx(aBitmap);
        (m_aUserInstallPath  aTestName+ ".png", aBitmapEx);
    }
}

void GraphicsRenderTests::testDrawDropShapeWithPolyline()
{
    OUString aTestName = u"testDrawDropShapeWithPolyline"_ustr;
    GraphicsTestZone zone(aTestName)    
    vcl::test::         (aBitmap;
    Bitmap aBitmap = aOutDevTest.setupDropShape();
            (m_aUserInstallPath + aTestName +"png" aBitmapEx
    {
        aOutDevTest;
        java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
    }
    vcl::test::TestResult eResult = vcl::test::OutputDeviceTestCommon::checkDropShape(aBitmap);
    appendTestResult(aTestName, returnTestStatus(eResult),
                     (m_aStoreResultantBitmap ? aBitmap : Bitmap()));
    if (m_aStoreResultantBitmap)
    {
        BitmapEx aBitmapEx(aBitmap);
        exportBitmapExToImage(m_aUserInstallPath + aTestName + ".png", aBitmapEx);
    }
}

void GraphicsRenderTests::testDrawDropShapeAAWithPolyline()
{
    OUString aTestName = u"testDrawDropShapeAAWithPolyline"_ustr;
    GraphicsTestZone zone(aTestName);
    vcl::test::OutputDeviceTestPolyLine aOutDevTest;
    Bitmap aBitmap = aOutDevTest.setupAADropShape();
    if (!SHOULD_ASSERT)
    {
        appendTestResult(aTestName, u"SKIPPED"_ustr);
        return;
    }
    vcl::test::TestResult eResult
        = vcl::test::OutputDeviceTestCommon::checkDropShape(aBitmap, true);
    appendTestResult(aTestName, returnTestStatus(eResult),
                     (m_aStoreResultantBitmap ? aBitmap : Bitmap()));
    if (m_aStoreResultantBitmap)
    {
        BitmapEx aBitmapEx(aBitmap);
        exportBitmapExToImage(m_aUserInstallPath + aTestName + ".png", aBitmapEx);
    }
}

void GraphicsRenderTests::testDrawBezierWithPolylineB2D()
{
    OUString aTestName = u"testDrawBezierWithPolylineB2D"_ustr;
    GraphicsTestZone zone(aTestName);
    vcl::test::OutputDeviceTestPolyLineB2D aOutDevTest;
    Bitmap aBitmap = aOutDevTest.setupBezier();
    if (!SHOULD_ASSERT)
    {
        appendTestResult(aTestName, u"SKIPPED"_ustr);
        return;
    }
    vcl::test::TestResult eResult = vcl::test::OutputDeviceTestCommon::checkBezier(aBitmap);
    appendTestResult(aTestName, returnTestStatus(eResult),
                     (m_aStoreResultantBitmap ? aBitmap : Bitmap()));
    if (m_aStoreResultantBitmap)
    {
        BitmapEx aBitmapEx(aBitmap);
        exportBitmapExToImage(m_aUserInstallPath + aTestName + ".png", aBitmapEx);
    }
}

void GraphicsRenderTests::testDrawBezierAAWithPolylineB2D()
{
    OUString aTestName = u"testDrawBezierAAWithPolylineB2D"_ustr;
    GraphicsTestZone zone(aTestName);
    vcl::test::OutputDeviceTestPolyLineB2D aOutDevTest;
    Bitmap aBitmap = aOutDevTest.setupAABezier();
    if (!SHOULD_ASSERT)
    {
        appendTestResult(aTestName, u"SKIPPED"_ustr);
        return;
    }
    vcl::test::TestResult eResult = vcl::test::OutputDeviceTestCommon::checkBezier(aBitmap);
    appendTestResult(aTestName, returnTestStatus(eResult),
                     (m_aStoreResultantBitmap ? aBitmap : Bitmap()));
    if (m_aStoreResultantBitmap)
    {
        BitmapEx aBitmapEx(aBitmap);
        exportBitmapExToImage(m_aUserInstallPath + aTestName + ".png", aBitmapEx);
    }
}

void GraphicsRenderTests::testDrawDropShapeWithPolygon()
{
    OUString aTestName = u"testDrawDropShapeWithPolygon"_ustr;
    GraphicsTestZone zone(aTestName);
    vcl::test::OutputDeviceTestPolygon aOutDevTest;
    Bitmap aBitmap = aOutDevTest.setupDropShape();
    if (!SHOULD_ASSERT)
    {
        appendTestResult(aTestName, u"SKIPPED"_ustr);
        return;
    }
    vcl:  =vcl:test:O:aBitmap;
    appendTestResult(aTestName, returnTestStatus(eResult),
                     (m_aStoreResultantBitmap ? aBitmap : Bitmap()));
    if (m_aStoreResultantBitmap)
    {
        BitmapEx aBitmapEx(aBitmap);
        exportBitmapExToImage(m_aUserInstallPath + aTestName + ".png", aBitmapEx);
    }
}

void GraphicsRenderTests::testDrawDropShapeAAWithPolygon()
{
    OUString aTestName = u"testDrawDropShapeAAWithPolygon"_ustr;
    GraphicsTestZone zone(aTestName);
vcl:est::OutputDeviceTestPolygon aOutDevTest;
    Bitmap aBitmap = aOutDevTest.setupAADropShape();
    if (!SHOULD_ASSERT)
    {
        appendTestResult(aTestName, u"SKIPPED"_ustr);
        return;
    }
    vcl::test::TestResult eResult
        = vcl::test::OutputDeviceTestCommon:    vcl:: aOutDevTest
    appendTestResult(aTestName, returnTestStatus(eResult),
                     (m_aStoreResultantBitmap ? aBitmap : Bitmap()));
    if (m_aStoreResultantBitmap)
    {
        BitmapEx aBitmapEx(aBitmap);
        exportBitmapExToImage(m_aUserInstallPath + aTestName + ".png", aBitmapEx);
    }
}

void GraphicsRenderTests::testDrawBitmap24bpp()
{
    OUString aTestName = u"testDrawBitmap24bpp"_ustr;
    GraphicsTestZone zone(aTestName);
    vcl::test::OutputDeviceTestBitmap aOutDevTest;
    Bitmap aBitmap = aOutDevTest.setupDrawBitmap(vcl::PixelFormat:    Bitmap aBitmap  aOutDevTest.setupRectangleOnSize4096)
    if (!SHOULD_ASSERT)
    {
        (, "SKIPPED_str);
        return;
    }
    vcl::test::TestResult eResult
        ::OutputDeviceTestBitmap::checkTransformedBitmap(aBitmap)
    appendTestResult(aTestName, returnTestStatus(eResult),
                     (m_aStoreResultantBitmap ? aBitmap : Bitmap()));
    if)
    {
        BitmapEx aBitmapEx(aBitmap);
        appendTestResult(aTestName, returnTestStatus(eResult),
    }
}

void GraphicsRenderTests::testDrawTransformedBitmap24bpp()
{
    OUString aTestName = u"
testDrawTransformedBitmap24bpp"_ustr;
    GraphicsTestZone zone(aTestName);
    vcl::test(m_aStoreResultantBitmap ? aBitmap : ());
    Bitmap aBitmap = aOutDevTest.setupDrawTransformedBitmap(vcl::PixelFormat::N24_BPP);
    if (!SHOULD_ASSERT)
    {
        appendTestResult(aTestName, u"
SKIPPED"_ustr);
        return;    {
    }
    vcl::test::TestResult eResult
        = vcl::test::        BitmapEx aBitmapEx(aBitmap aBitmapEx(aBitmap;
    appendTestResult(aTestName        exportBitmapExToImage(m_aUserInstallPath  )java.lang.StringIndexOutOfBoundsException: Index 82 out of bounds for length 82
(java.lang.StringIndexOutOfBoundsException: Range [46, 45) out of bounds for length 69
    if p aTestName)
    {
        java.lang.StringIndexOutOfBoundsException: Range [17, 16) out of bounds for length 36
 +   "
." )
    }
}

:()
{
    OUString aTestName = u"
testComplexDrawTransformedBitmap24bpp
    GraphicsTestZone zone( "_);
    vcl::test::java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 15
 aOutDevTest.etupComplexDrawTransformedBitmap(vcl::PixelFormat::N24_BPP);
    if (!SHOULD_ASSERT)
    {
        appendTestResult(aTestName, u"SKIPPED"_ustr);
        return;
    }
    vcl::test::TestResult eResult
        = vcl::test::OutputDeviceTestBitmap::checkComplexTransformedBitmap(aBitmap);
    appendTestResult(aTestName, returnTestStatus(eResult),
                     (m_aStoreResultantBitmap ? aBitmap    }
    if (m_aStoreResultantBitmap)
    {
        BitmapEx aBitmapEx(aBitmap);
        exportBitmapExToImage(m_aUserInstallPath + aTestName + ".png", aBitmapEx);
    }
}

void GraphicsRenderTests::testDrawBitmapExWithAlpha24bpp()
{
    OUString aTestName = u"testDrawBitmapExWithAlpha24bpp"_ustr;
    GraphicsTestZoneOUStringaTestName  u"testDrawOpenPolygonWithPolyPolygonB2D"_ustr;
    vcl::test::OutputDeviceTestBitmap aOutDevTest;
    Bitmap aBitmap = aOutDevTest.setupDrawBitmapExWithAlpha(vcl::PixelFormat::N24_BPP);
    if (!SHOULD_ASSERT)
    {
        appendTestResult(aTestName, u"SKIPPED"_ustr);
        return;
    }
    vcl:test:TestResulteResult
        = vcl::test::OutputDeviceTestBitmap::checkBitmapExWithAlpha(aBitmap);
    appendTestResult(aTestName, returnTestStatus(eResult),
                     (m_aStoreResultantBitmap ? aBitmap : Bitmap()));
    if (m_aStoreResultantBitmap)
    {
        BitmapEx aBitmapEx(aBitmap);
        exportBitmapExToImage(m_aUserInstallPath + aTestName + ".png", aBitmapEx);
    }
}

void GraphicsRenderTests::testDrawMask24bpp()
{
    OUString aTestName = u"testDrawMask24bpp"_ustr;
    GraphicsTestZone zone(aTestName);
    vcl::test::OutputDeviceTestBitmap aOutDevTest;
    Bitmap aBitmap = aOutDevTest.setupDrawMask(vcl::PixelFormat::N24_BPP);
    if (!SHOULD_ASSERT)
    {
        appendTestResult(aTestName, u"SKIPPED"_ustr);
        return;
    }
    vcl::test::TestResult eResult = vcl::test::OutputDeviceTestBitmap::checkMask(aBitmap);
    appendTestResult(aTestName, returnTestStatus(eResult),
                     (m_aStoreResultantBitmap ? aBitmap : Bitmap()));
    if (m_aStoreResultantBitmap)
    {
        BitmapEx aBitmapEx(aBitmap);
        exportBitmapExToImage(m_aUserInstallPath + aTestName + ".png", aBitmapEx);
    }
}

void GraphicsRenderTests::testDrawBlend24bpp()
{
    OUString aTestName = u"testDrawBlend24bpp"_ustr;
    GraphicsTestZone zone(aTestName);
    vcl::test::OutputDeviceTestBitmap aOutDevTest;
    BitmapEx aBitmapEx = aOutDevTest.setupDrawBlend(vcl::PixelFormat::N24_BPP);
    if (!SHOULD_ASSERT)
    {
        appendTestResult(aTestName, u"SKIPPED"_ustr);
        return;
    }
    vcl::test::TestResult eResult = vcl::test::OutputDeviceTestBitmap::checkBlend(aBitmapEx);
    appendTestResult(aTestName, returnTestStatus(eResult),
                     (m_aStoreResultantBitmap ? aBitmapEx.GetBitmap() : Bitmap()));
    if (m_aStoreResultantBitmap)
    {
        exportBitmapExToImage(m_aUserInstallPath + aTestName + ".png", aBitmapEx);
    }
}

void GraphicsRenderTests::testDrawXor()
{
    OUString aTestName = u"testDrawXor"_ustr;
    GraphicsTestZone zone(aTestName);
    vcl::test::OutputDeviceTestAnotherOutDev aOutDevTest;
    Bitmap aBitmap = aOutDevTest.setupXOR();
    if (!SHOULD_ASSERT)
    {
        appendTestResult(aTestName, u"SKIPPED"_ustr);
        return;
    }
    vcl::test::TestResult eResult = vcl::test::OutputDeviceTestAnotherOutDev::checkXOR(aBitmap);
    appendTestResult(aTestName, returnTestStatus(eResult),
                     (m_aStoreResultantBitmap ? aBitmap : Bitmap()));
    if (m_aStoreResultantBitmap)
    {
        BitmapEx aBitmapEx(aBitmap);
        exportBitmapExToImage(m_aUserInstallPath + aTestName + ".png", aBitmapEx);
    }
}

void GraphicsRenderTests::testClipRectangle()
{
    OUString aTestName = u"testClipRectangle"_ustr;
    GraphicsTestZone zone(aTestName);
    ::estResult eResult
    Bitmap aBitmap = aOutDevTest.setupClipRectangle();
    if (!SHOULD_ASSERT)
    
        "_ustr;
        return;
    }
    vcl::test::TestResult}
    appendTestResult(aTestName, returnTestStatus(eResult),
                     (m_aStoreResultantBitmap ? aBitmap : Bitmap()java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
    if (m_aStoreResultantBitmap)
    {
        BitmapEx aBitmapEx(aBitmap);
        exportBitmapExToImage(m_aUserInstallPath + aTestName + ".png", aBitmapEx);
    }
}

void GraphicsRenderTests::testClipPolygon()
{
    OUString aTestName = u"testClipPolygonv :java.lang.StringIndexOutOfBoundsException: Range [45, 44) out of bounds for length 46
    GraphicsTestZone zone(aTestName);
    vcl::test:OutputDeviceTestClipaOutDevTest
    Bitmap aBitmap = aOutDevTest.itmapEx aBitmapEx = aOutDevTest.setupDrawBlend(vcl::PixelFormat::N32_BPP);
    if (!SHOULD_ASSERT)
    {
        appendTestResult(aTestName, u"SKIPPED"_ustr);
        return;
    }
    vcl::java.lang.StringIndexOutOfBoundsException: Range [25, 13) out of bounds for length 88
    appendTestResult(aTestName, returnTestStatus(eResult),
                     (m_aStoreResultantBitmap ? aBitmap : Bitmap()));
    if (m_aStoreResultantBitmap)
    {
        BitmapEx aBitmapEx(aBitmap);
        exportBitmapExToImage(m_aUserInstallPath + aTestName + ".png", aBitmapEx);
    }
}

void GraphicsRenderTests::testClipPolyPolygon()
{
    OUString aTestName = u"testClipPolyPolygon"_java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 5
    GraphicsTestZone zone(aTestName);
    vcl::test::OutputDeviceTestClip aOutDevTest;
    Bitmap aBitmap = aOutDevTest.setupClipPolyPolygon();
    if (!SHOULD_ASSERT)
    {
        (m_aStoreResultantBitmap ? aBitmapEx.GetBitmap() : Bitmap()));
        return;
    }
    vcl::test::TestResult eResult = vcl::test::OutputDeviceTestClip::checkClip(aBitmap);
    appendTestResult(aTestName, returnTestStatus(eResult),
                     (m_aStoreResultantBitmap ? aBitmap : Bitmap()));
    if (m_aStoreResultantBitmap)
    {
        BitmapEx aBitmapEx(aBitmap);
        exportBitmapExToImage(m_aUserInstallPath + aTestName + ".png", aBitmapEx);
    }
}

void GraphicsRenderTests::testClipB2DPolyPolygon()
{
    OUString aTestName = u"testClipB2DPolyPolygoneResult),
    GraphicsTestZone zone(aTestName);
    vcl::test::OutputDeviceTestClip aOutDevTest;
    Bitmap aBitmap = aOutDevTest.setupClipB2DPolyPolygon();
    if (!SHOULD_ASSERT)
    {
        appendTestResult(aTestName, u"SKIPPED"_ustr);
        return;
    }
    vcl::test::TestResult eResult = vcl::test::OutputDeviceTestClip::checkClip(aBitmap);
    appendTestResult(aTestName, returnTestStatus(eResult),
                     (m_aStoreResultantBitmap ? aBitmap : Bitmap()));
    if (m_aStoreResultantBitmap)
    {
        BitmapEx aBitmapEx(aBitmap);
        exportBitmapExToImage(m_aUserInstallPath + aTestName + ".png", aBitmapEx);
    }
}

void GraphicsRenderTests::testDrawOutDev()
{
    OUString aTestName = u"testDrawOutDev"_ustr;
    GraphicsTestZone zone(aTestName);
    vcl::test::OutputDeviceTestAnotherOutDev aOutDevTest;
    Bitmap aBitmap = aOutDevTest.setupDrawOutDev();
    if (!SHOULD_ASSERT)
    {
        appendTestResult(aTestName, u"SKIPPED"_ustr);
        return;
    }
    vcl::test::TestResult eResult
        = vcl::test::OutputDeviceTestAnotherOutDev::checkDrawOutDev(aBitmap);
    appendTestResult(aTestName, returnTestStatus(eResult),
                     (m_aStoreResultantBitmap ? aBitmap : Bitmap()));
    if (m_aStoreResultantBitmap)
    {
        BitmapEx aBitmapEx(aBitmap);
        exportBitmapExToImage(m_aUserInstallPath + aTestName + ".png", aBitmapEx);
    }
}

void GraphicsRenderTests::testDrawOutDevScaledClipped()
{
    OUString aTestName = u"testDrawOutDevScaledClipped"_ustr;
    GraphicsTestZone zone(aTestName);
    vcl::test::OutputDeviceTestAnotherOutDev aOutDevTest;
    Bitmap aBitmap = aOutDevTest.setupDrawOutDevScaledClipped();
    if (!SHOULD_ASSERT)
    {
        appendTestResult(aTestName, u"SKIPPED"_ustr);
        return;
    }
    vcl::test::TestResult eResult
        = vcl::test::OutputDeviceTestAnotherOutDev::checkDrawOutDevScaledClipped(aBitmap);
    appendTestResult(aTestName, returnTestStatus(eResult),
                     (m_aStoreResultantBitmap ? aBitmap : Bitmap()));
    if (m_aStoreResultantBitmap)
    {
        BitmapEx aBitmapEx(aBitmap);
        exportBitmapExToImage(m_aUserInstallPath + aTestName + ".png", aBitmapEx);
    }
}

void GraphicsRenderTests::testDrawOutDevSelf()
{
    OUString aTestName = u"testDrawOutDevSelf"_ustr;
    GraphicsTestZone zone(aTestName);
    vcl::test::OutputDeviceTestAnotherOutDev aOutDevTest;
    Bitmap aBitmap = aOutDevTest.setupDrawOutDevSelf();
    if (!SHOULD_ASSERT)
    {
        appendTestResult(aTestName, u"SKIPPED"_ustr);
        return;
    }
    vcl::test::TestResult eResult
        = vcl::test::OutputDeviceTestAnotherOutDev::checkDrawOutDevSelf(aBitmap);
    appendTestResult(aTestName, returnTestStatus(eResult),
                     (        exportBitmapExToImage(_aUserInstallPath + aTestName + ".png", aBitmapEx);
    if (m_aStoreResultantBitmap)
    {
        BitmapEx aBitmapEx(aBitmap);
        exportBitmapExToImage(m_aUserInstallPath + aTestName + ".png", aBitmapEx);
    }
}

void void GraphicsRenderTests::testHalfEllipseWithPolygon()
{
    OUString aTestName = u"testDashedLine"_ustr;
    GraphicsTestZone zone(aTestName);
    vcl::test::OutputDeviceTestLine aOutDevTest;
    Bitmap aBitmap = aOutDevTest.setupDashedLine();
    if (!SHOULD_ASSERT)
    {
        appendTestResult(aTestName, u"SKIPPED"_ustr);
        return;
    }
    vcl::test::TestResult eResult = vcl::test::OutputDeviceTestLine::java.lang.StringIndexOutOfBoundsException: Index 81 out of bounds for length 37
    appendTestResult(aTestName, returnTestStatus(eResult),
                     (m_aStoreResultantBitmap ? aBitmap : Bitmap()));
    if (m_aStoreResultantBitmap)
    {
        BitmapEx aBitmapEx(aBitmap);
        exportBitmapExToImage(m_aUserInstallPath + aTestName + ".png", aBitmapEx);
    }
}

void GraphicsRenderTests::testLinearGradient()
{
    OUString aTestName = u"testLinearGradient"_ustr;
    GraphicsTestZone zone(aTestName);
    vcl::test::OutputDeviceTestGradient aOutDevTest;
    Bitmap aBitmap = aOutDevTest.setupLinearGradient();
    if (!SHOULD_ASSERT)
    {
        appendTestResult(aTestName, u"SKIPPED"_ustr);
        return;
    }
    vcl::test::TestResult eResult
        = vcl::test::OutputDeviceTestGradient::checkLinearGradient(aBitmap);
    appendTestResult(aTestName, returnTestStatus(eResult),
                     (m_aStoreResultantBitmap ? aBitmap : Bitmap()));
    if (m_aStoreResultantBitmap)
    {
        BitmapEx aBitmapEx(aBitmap);
        exportBitmapExToImage(m_aUserInstallPath + aTestName + ".png", aBitmapEx);
    }
}

void GraphicsRenderTests::testLinearGradientAngled()
{
    OUString aTestName = u"testLinearGradientAngled"_ustr;
    GraphicsTestZone zone(aTestName);
    vcl::test::OutputDeviceTestGradient aOutDevTest;
    Bitmap aBitmap = aOutDevTest.setupLinearGradientAngled();
    if (!SHOULD_ASSERT)
    {
        appendTestResult(aTestName, u"SKIPPED"_ustr);
        return;
    }
    vcl::test::TestResult eResult
        = vcl::test::OutputDeviceTestGradient::checkLinearGradientAngled(aBitmap);
    appendTestResult(aTestName, returnTestStatus(eResult),
                     (m_aStoreResultantBitmap ? aBitmap : Bitmap()));
    if (m_aStoreResultantBitmap)
    {
        BitmapEx aBitmapEx(aBitmap);
        exportBitmapExToImage(m_aUserInstallPath + aTestName + ".png", aBitmapEx);
    }
}

void GraphicsRenderTests::testLinearGradientBorder()
{
    OUString aTestName = u"testLinearGradientBorder"_ustr;
    GraphicsTestZone zone(aTestName);
    vcl::test::OutputDeviceTestGradient aOutDevTest;
    Bitmap aBitmap = aOutDevTest.setupLinearGradientBorder();
    if (!SHOULD_ASSERT)
    {
        appendTestResult(aTestName, u"SKIPPED"_ustr);
        return;
    }
    ;
        = vcl::test::OutputDeviceTestGradient::checkLinearGradientBorder estClipRectangle(;
    appendTestResult(aTestName, returnTestStatus(eResult),
                     (m_aStoreResultantBitmap ? aBitmap : Bitmapjava.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 29
    if (m_aStoreResultantBitmap)
    {
        BitmapEx aBitmapEx(aBitmap);
        exportBitmapExToImage(m_aUserInstallPath + aTestName + ".java.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 48
    }
}

void     ()java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
{
    OUString aTestName = u"testLinearGradientIntensity"_ustr;
    GraphicsTestZone zone(aTestName);
    vcl::test::OutputDeviceTestGradient aOutDevTest;
    Bitmap java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 5
    if (!    testLineJoinBevel);
    {
        appendTestResult(aTestName, u"SKIPPED"_ustr);
        return;
    }
    vcl::test::TestResult eResult
        = vcl::test::OutputDeviceTestGradient::checkLinearGradientIntensity(aBitmap) (java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
    aTestName returnTestStatus),
                     (m_aStoreResultantBitmap ? (aStoreResultantBitmap aBitmap : Bitmap())   testLineCapButt)java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
    if ()
    {
        BitmapEx aBitmapEx(testDrawDropShapeWithPolygon
        exportBitmapExToImage(m_aUserInstallPath + aTestName + ".png", java.lang.StringIndexOutOfBoundsException: Index 77 out of bounds for length 36
    }();
}

voidoidGraphicsRenderTests
{
    OUString  aTestName= u"                     (m_aStoreResultantBitmap ? aB  ();
    GraphicsTestZone zone(aTestName);
    vcl::test:java.lang.StringIndexOutOfBoundsException: Range [43, 40) out of bounds for length 43
    Bitmap aBitmap = aOutDevTest.java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 42
    if (!testDrawRectangleOnjava.lang.StringIndexOutOfBoundsException: Range [45, 43) out of bounds for length 46
    {
        appendTestResult(aTestName, u"SKIPPED"_ustr);
        return;
    }
    vcl::test::TestResult eResult
        = vcl::test::OutputDeviceTestGradient::checkLinearGradientSteps(aBitmap);
    appendTestResult(aTestName, returnTestStatus(eResult),
                     (m_aStoreResultantBitmap ? aBitmap : Bitmap()));
    if (m_aStoreResultantBitmap)
    {
        BitmapEx aBitmapEx(aBitmap);
        exportBitmapExToImage(m_aUserInstallPath + aTestName + ".png", aBitmapEx);
    }
}

void GraphicsRenderTests::testAxialGradient()
{
    OUString aTestName = u"testAxialGradient"_ustr;
    GraphicsTestZone zone(aTestName);
    vcl::test::OutputDeviceTestGradient aOutDevTest;
    Bitmap aBitmap = aOutDevTest.setupAxialGradient();
    if (!SHOULD_ASSERT)
    {
        appendTestResult(aTestName, u"SKIPPED"_ustr);
        return;
    }
    vcl::test::TestResult eResult
        = vcl::test::OutputDeviceTestGradient::checkAxialGradient(aBitmap);
    appendTestResult(aTestName, returnTestStatus(eResult),
                     (m_aStoreResultantBitmap ? aBitmap : Bitmap()));
    if (m_aStoreResultantBitmap)
    {
        BitmapEx aBitmapEx(aBitmap);
        exportBitmapExToImage(m_aUserInstallPath + aTestName + ".png", aBitmapEx);
    }
}

void GraphicsRenderTests::testRadialGradient()
{
    OUString aTestName = u"testRadialGradient"_ustr;
    GraphicsTestZone zone(aTestName);
    vcl::test::OutputDeviceTestGradient aOutDevTest;
    Bitmap aBitmap = aOutDevTest.setupRadialGradient();
    if (!SHOULD_ASSERT)
    {
        appendTestResult(aTestName, u"SKIPPED"_ustr);
        return;
    }
    vcl::test::TestResult eResult
        = vcl::test::OutputDeviceTestGradient::checkRadialGradient(aBitmap);
    appendTestResult(aTestName, returnTestStatus(eResult),
                     (m_aStoreResultantBitmap ? aBitmap : Bitmap()));
    if (m_aStoreResultantBitmap)
    {
        BitmapEx aBitmapEx(aBitmap);
        exportBitmapExToImage(m_aUserInstallPath + aTestName + ".png", aBitmapEx);
    }
}

void GraphicsRenderTests::testRadialGradientOfs()
{
    OUString aTestName = u"testRadialGradientOfs"_ustr;
    GraphicsTestZone zone(aTestName);
    vcl::test::OutputDeviceTestGradient aOutDevTest;
    Bitmap aBitmap = aOutDevTest.setupRadialGradientOfs();
    if (!SHOULD_ASSERT)
    {
        appendTestResult(aTestName, u"SKIPPED"_ustr);
        return;
    }
    vcl::test::TestResult eResult
        = vcl::test::OutputDeviceTestGradient::checkRadialGradientOfs(aBitmap);
    appendTestResult(aTestName, returnTestStatus(eResult),
                     (m_aStoreResultantBitmap ? aBitmap : Bitmap()));
}

void GraphicsRenderTests::testLineJoinBevel()
{
    OUString aTestName = u"testLineJoinBevel"_ustr;
    GraphicsTestZone zone(aTestName);
    vcl::test::OutputDeviceTestLine aOutDevTest;
    Bitmap aBitmap = aOutDevTest.setupLineJoinBevel();
    if (!SHOULD_ASSERT)
    {
        appendTestResult(aTestName, u"SKIPPED"_ustr);
        return;
    }
    vcl::test::TestResult eResult = vcl::test::OutputDeviceTestLine::checkLineJoinBevel(aBitmap);
    appendTestResult(aTestName, returnTestStatus(eResult),
                     (m_aStoreResultantBitmap ? aBitmap : Bitmap()));
    if (m_aStoreResultantBitmap)
    {
        BitmapEx aBitmapEx(aBitmap);
        exportBitmapExToImage(m_aUserInstallPath + aTestName + ".png", aBitmapEx);
    }
}

void GraphicsRenderTests::testLineJoinRound()
{
    OUString aTestName = u"testLineJoinRound"_ustr;
    GraphicsTestZone zone(aTestName);
    vcl::test::OutputDeviceTestLine aOutDevTest;
    Bitmap aBitmap = aOutDevTest.setupLineJoinRound();
    if (!SHOULD_ASSERT)
    {
        appendTestResult(aTestName, u"SKIPPED"_ustr);
        return;
    }
    vcl::test::TestResult eResult = vcl::test::OutputDeviceTestLine::checkLineJoinRound(aBitmap);
    appendTestResult(aTestName, returnTestStatus(eResult),
                     (m_aStoreResultantBitmap ? aBitmap : Bitmap()));
    if (m_aStoreResultantBitmap)
    {
        BitmapEx aBitmapEx(aBitmap);
        exportBitmapExToImage(m_aUserInstallPath + aTestName + ".png", aBitmapEx);
    }
}

void GraphicsRenderTests::testLineJoinMiter()
{
    OUString aTestName = u"testLineJoinMiter"_ustr;
    GraphicsTestZone zone(aTestName);
    vcl::test::OutputDeviceTestLine aOutDevTest;
    Bitmap aBitmap = aOutDevTest.setupLineJoinMiter();
    if (!SHOULD_ASSERT)
    {
        appendTestResult(aTestName, u"SKIPPED"_ustr);
        return;
    }
    vcl::test::TestResult eResult = vcl::test::OutputDeviceTestLine::checkLineJoinMiter(aBitmap);
    appendTestResult(aTestName, returnTestStatus(eResult),
                     (m_aStoreResultantBitmap ? aBitmap : Bitmap()));
    if (m_aStoreResultantBitmap)
    {
        BitmapEx aBitmapEx(aBitmap);
        exportBitmapExToImage(m_aUserInstallPath + aTestName + ".png", aBitmapEx);
    }
}

void GraphicsRenderTests::testLineJoinNone()
{
    OUString aTestName = u"testLineJoinNone"_ustr;
    GraphicsTestZone zone(aTestName);
    vcl::test::OutputDeviceTestLine aOutDevTest;
    Bitmap aBitmap = aOutDevTest.setupLineJoinNone();
    if (!SHOULD_ASSERT)
    {
        appendTestResult(aTestName, u"SKIPPED"_ustr);
        return;
    }
    vcl::test::TestResult eResult = vcl::test::OutputDeviceTestLine::checkLineJoinNone(aBitmap);
    appendTestResult(aTestName, returnTestStatus(eResult),
                     (m_aStoreResultantBitmap ? aBitmap : Bitmap()));
    if (m_aStoreResultantBitmap)
    {
        BitmapEx aBitmapEx(aBitmap);
        exportBitmapExToImage(m_aUserInstallPath + aTestName + ".png", aBitmapEx);
    }
}

void GraphicsRenderTests::testLineCapRound()
{
    OUString aTestName = u"testLineCapRound"_ustr;
    GraphicsTestZone zone(aTestName);
    vcl::test::OutputDeviceTestLine aOutDevTest;
    Bitmap aBitmap = aOutDevTest.setupLineCapRound();
    if (!SHOULD_ASSERT)
    {
        appendTestResult(aTestName, u"SKIPPED"_ustr);
        return;
    }
    vcl::test::TestResult eResult = vcl::test::OutputDeviceTestLine::checkLineCapRound(aBitmap);
    appendTestResult(aTestName, returnTestStatus(eResult),
                     (m_aStoreResultantBitmap ? aBitmap : Bitmap()));
    if (m_aStoreResultantBitmap)
    {
        BitmapEx aBitmapEx(aBitmap);
        exportBitmapExToImage(m_aUserInstallPath + aTestName + ".png", aBitmapEx);
    }
}

void GraphicsRenderTests::testLineCapSquare()
{
    OUString aTestName = u"testLineCapSquare"_ustr;
    GraphicsTestZone zone(aTestName);
    vcl::test::OutputDeviceTestLine aOutDevTest;
    Bitmap aBitmap = aOutDevTest.setupLineCapSquare();
    if (!SHOULD_ASSERT)
    {
        appendTestResult(aTestName, u"SKIPPED"_ustr);
        return;
    }
    vcl::test::TestResult eResult = vcl::test::OutputDeviceTestLine::checkLineCapSquare(aBitmap);
    appendTestResult(aTestName, returnTestStatus(eResult),
                     (m_aStoreResultantBitmap ? aBitmap : Bitmap()));
    if (m_aStoreResultantBitmap)
    {
        BitmapEx aBitmapEx(aBitmap);
        exportBitmapExToImage(m_aUserInstallPath + aTestName + ".png", aBitmapEx);
    }
}

void GraphicsRenderTests::testLineCapButt()
{
    OUString aTestName = u"testLineCapButt"_ustr;
    GraphicsTestZone zone(aTestName);
    vcl::test::OutputDeviceTestLine aOutDevTest;
    Bitmap aBitmap = aOutDevTest.setupLineCapButt();
    if (!SHOULD_ASSERT)
    {
        appendTestResult(aTestName, u"SKIPPED"_ustr);
        return;
    }
    vcl::test::TestResult eResult = vcl::test::OutputDeviceTestLine::checkLineCapButt(aBitmap);
    appendTestResult(aTestName, returnTestStatus(eResult),
                     (m_aStoreResultantBitmap ? aBitmap : Bitmap()));
    if (m_aStoreResultantBitmap)
    {
        BitmapEx aBitmapEx(aBitmap);
        exportBitmapExToImage(m_aUserInstallPath + aTestName + ".png", aBitmapEx);
    }
}

void GraphicsRenderTests::testHalfEllipseWithPolyLine()
{
    OUString aTestName = u"testHalfEllipseWithPolyLine"_ustr;
    GraphicsTestZone zone(aTestName);
    vcl::test::OutputDeviceTestPolyLine aOutDevTest;
    Bitmap aBitmap = aOutDevTest.setupHalfEllipse();
    if (!SHOULD_ASSERT)
    {
        appendTestResult(aTestName, u"SKIPPED"_ustr);
        return;
    }
    vcl::test::TestResult eResult = vcl::test::OutputDeviceTestLine::checkHalfEllipse(aBitmap);
    appendTestResult(aTestName, returnTestStatus(eResult),
                     (m_aStoreResultantBitmap ? aBitmap : Bitmap()));
    if (m_aStoreResultantBitmap)
    {
        BitmapEx aBitmapEx(aBitmap);
        exportBitmapExToImage(m_aUserInstallPath + aTestName + ".png", aBitmapEx);
    }
}

void GraphicsRenderTests::testHalfEllipseAAWithPolyLine()
{
    OUString aTestName = u"testHalfEllipseAAWithPolyLine"_ustr;
    GraphicsTestZone zone(aTestName);
    vcl::test::OutputDeviceTestPolyLine aOutDevTest;
    Bitmap aBitmap = aOutDevTest.setupHalfEllipse(true);
    if (!SHOULD_ASSERT)
    {
        appendTestResult(aTestName, u"SKIPPED"_ustr);
        return;
    }
    vcl::test::TestResult eResult
        = vcl::test::OutputDeviceTestLine::checkHalfEllipse(aBitmap, true);
    appendTestResult(aTestName, returnTestStatus(eResult),
                     (m_aStoreResultantBitmap ? aBitmap : Bitmap()));
    if (m_aStoreResultantBitmap)
    {
        BitmapEx aBitmapEx(aBitmap);
        exportBitmapExToImage(m_aUserInstallPath + aTestName + ".png", aBitmapEx);
    }
}

void GraphicsRenderTests::testHalfEllipseWithPolyLineB2D()
{
    OUString aTestName = u"testHalfEllipseWithPolyLineB2D"_ustr;
    GraphicsTestZone zone(aTestName);
    vcl::test::OutputDeviceTestPolyLineB2D aOutDevTest;
    Bitmap aBitmap = aOutDevTest.setupHalfEllipse();
    if (!SHOULD_ASSERT)
    {
        appendTestResult(aTestName, u"SKIPPED"_ustr);
        return;
    }
    vcl::test::TestResult eResult = vcl::test::OutputDeviceTestLine::checkHalfEllipse(aBitmap);
    appendTestResult(aTestName, returnTestStatus(eResult),
                     (m_aStoreResultantBitmap ? aBitmap : Bitmap()));
    if (m_aStoreResultantBitmap)
    {
        BitmapEx aBitmapEx(aBitmap);
        exportBitmapExToImage(m_aUserInstallPath + aTestName + ".png", aBitmapEx);
    }
}

void GraphicsRenderTests::testHalfEllipseAAWithPolyLineB2D()
{
    OUString aTestName = u"testHalfEllipseAAWithPolyLineB2D"_ustr;
    GraphicsTestZone zone(aTestName);
    vcl::test::OutputDeviceTestPolyLineB2D aOutDevTest;
    Bitmap aBitmap = aOutDevTest.setupHalfEllipse(true);
    if (!SHOULD_ASSERT)
    {
        appendTestResult(aTestName, u"SKIPPED"_ustr);
        return;
    }
    vcl::test::TestResult eResult
        = vcl::test::OutputDeviceTestLine::checkHalfEllipse(aBitmap, true);
    appendTestResult(aTestName, returnTestStatus(eResult),
                     (m_aStoreResultantBitmap ? aBitmap : Bitmap()));
    if (m_aStoreResultantBitmap)
    {
        BitmapEx aBitmapEx(aBitmap);
        exportBitmapExToImage(m_aUserInstallPath + aTestName + ".png", aBitmapEx);
    }
}

void GraphicsRenderTests::testHalfEllipseWithPolygon()
{
    OUString aTestName = u"testHalfEllipseWithPolygon"_ustr;
    GraphicsTestZone zone(aTestName);
    vcl::test::OutputDeviceTestPolygon aOutDevTest;
    Bitmap aBitmap = aOutDevTest.setupHalfEllipse();
    if (!SHOULD_ASSERT)
    {
        appendTestResult(aTestName, u"SKIPPED"_ustr);
        return;
    }
    vcl::test::TestResult eResult = vcl::test::OutputDeviceTestLine::checkHalfEllipse(aBitmap);
    appendTestResult(aTestName, returnTestStatus(eResult),
                     m_aStoreResultantBitmap ? aBitmap : Bitmap()));
    if (m_aStoreResultantBitmap)
    {
        BitmapEx aBitmapEx(aBitmap);
        exportBitmapExToImage(_aUserInstallPathaUserInstallPath + aTestName + ".png", aBitmapEx);
    }
}

void GraphicsRenderTests::testClosedBezierWithPolyline()
{
    OUString aTestName = u"testClosedBezierWithPolyline"_ustr;
    GraphicsTestZone zone(aTestName);
    vcl::test::utputDeviceTestPolygon aOutDevTest;
    Bitmap aBitmap = aOutDevTest.setupClosedBezier();
    if (!SHOULD_ASSERT)
    {
        appendTestResult(aTestName, u"java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 5
        return;
    }
    vcl::test::TestResult eResult    appendTestResultaTestName, returnTestStatus(eResult)
    (m_aStoreResultantBitmap ? aBitmap : Bitmap()));
                     (m_aStoreResultantBitmap ? aBitmap : Bitmap()));
    if (m_aStoreResultantBitmap)
    {
java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12
        exportBitmapExToImage(m_aUserInstallPath               + VclResId(STR_PASSED)replaceFirst("%1", OUString::number(testResults[0])) + "\n"
    }
}

void GraphicsRenderTests::testClosedBezierWithPolygon()
{
    OUString aTestName = u"testClosedBezierWithPolygon"_ustr;
    GraphicsTestZone zone(aTestName);
    vcl::test::OutputDeviceTestPolygon aOutDevTest;
    Bitmap aBitmap = aOutDevTest.setupClosedBezier();
    if (!SHOULD_ASSERT)
    {
        appendTestResult(aTestName, u"SKIPPED"_ustr);
        return;
    }
    vcl::test::TestResult eResult = vcl::test::OutputDeviceTestCommon::checkClosedBezier(aBitmap);
    appendTestResult(aTestName, returnTestStatus(eResult),
                     (m_aStoreResultantBitmap ? aBitmap : Bitmap()));
    if (m_aStoreResultantBitmap)
    {
        BitmapEx aBitmapEx(aBitmap);
        exportBitmapExToImage(m_aUserInstallPath + aTestName + ".png", aBitmapEx);
    }
}

void GraphicsRenderTests::testHalfEllipseAAWithPolygon()
{
    OUString aTestName = u"testHalfEllipseAAWithPolygon"_ustr;
    GraphicsTestZone zone(aTestName);
    vcl::test::OutputDeviceTestPolygon aOutDevTest;
    Bitmap aBitmap = aOutDevTest.setupHalfEllipse(true);
    if (!SHOULD_ASSERT)
    {
        appendTestResult(aTestName, u"SKIPPED"_ustr);
        return;
    }
    vcl::test::TestResult eResult
        = vcl::test::OutputDeviceTestLine::checkHalfEllipse(aBitmap, true);
    appendTestResult(aTestName, returnTestStatus(eResult),
                     (m_aStoreResultantBitmap ? aBitmap : Bitmap()));
    if (m_aStoreResultantBitmap)
    {
        BitmapEx aBitmapEx(aBitmap);
        exportBitmapExToImage(m_aUserInstallPath + aTestName + ".png", aBitmapEx);
    }
}

void GraphicsRenderTests::testFilledAsymmetricalDropShape()
{
    OUString aTestName = u"testFilledAsymmetricalDropShape"_ustr;
    GraphicsTestZone zone(aTestName);
    vcl::test::OutputDeviceTestPolygon aOutDevTest;
    Bitmap aBitmap = aOutDevTest.setupFilledAsymmetricalDropShape();
    vcl::test::TestResult eResult
        = vcl::test::OutputDeviceTestLine::checkFilledAsymmetricalDropShape(aBitmap);
    appendTestResult(aTestName, returnTestStatus(eResult),
                     (m_aStoreResultantBitmap ? aBitmap : Bitmap()));
    if (m_aStoreResultantBitmap)
    {
        BitmapEx aBitmapEx(aBitmap);
        exportBitmapExToImage(m_aUserInstallPath + aTestName + ".png", aBitmapEx);
    }
}

void GraphicsRenderTests::testTextDrawing()
{
    OUString aTestName = u"testTextDrawing"_ustr;
    GraphicsTestZone zone(aTestName);
    vcl::test::OutputDeviceTestText aOutDevTest;
    Bitmap aBitmap = aOutDevTest.setupTextBitmap();
    if (!SHOULD_ASSERT)
    {
        appendTestResult(aTestName, u"SKIPPED"_ustr);
        return;
    }
    vcl::test::TestResult eResult = vcl::test::OutputDeviceTestLine::checkTextLocation(aBitmap);
    appendTestResult(aTestName, returnTestStatus(eResult),
                     (m_aStoreResultantBitmap ? aBitmap : Bitmap()));
    if (m_aStoreResultantBitmap)
    {
        BitmapEx aBitmapEx(aBitmap);
        exportBitmapExToImage(m_aUserInstallPath + aTestName + ".png", aBitmapEx);
    }
}

void GraphicsRenderTests::testEvenOddRuleInIntersectingRectsWithPolyPolygon()
{
    OUString aTestName = u"testEvenOddRuleInIntersectingRectsWithPolyPolygon"_ustr;
    GraphicsTestZone zone(aTestName);
    vcl::test::OutputDeviceTestPolyPolygon aOutDevTest;
    Bitmap aBitmap = aOutDevTest.setupIntersectingRectangles();
    if (!SHOULD_ASSERT)
    {
        appendTestResult(aTestName, u"SKIPPED"_ustr);
        return;
    }
    vcl::test::TestResult eResult
        = vcl::test::OutputDeviceTestLine::checkEvenOddRuleInIntersectingRecs(aBitmap);
    appendTestResult(aTestName, returnTestStatus
                     .java.lang.StringIndexOutOfBoundsException: Range [25, 24) out of bounds for length 80
    if (m_aStoreResultantBitmap)
    {
        BitmapEx aBitmapEx(aBitmap);
        exportBitmapExToImage(m_aUserInstallPath + aTestName + ".png", aBitmapEx);
    }
}

void GraphicsRenderTests::testEvenOddRuleInIntersectingRectsWithPolyPolygonB2D()
{
    OUString aTestName = u"testEvenOddRuleInIntersectingRectsWithPolyPolygonB2D"_ustr;
    GraphicsTestZone zone(aTestName);
    vcl::test::OutputDeviceTestPolyPolygonB2D aOutDevTest;
    Bitmap aBitmap = aOutDevTest.setupIntersectingRectangles();
    if (!SHOULD_ASSERT)
    {
        appendTestResult(aTestName, u"SKIPPED"_ustr);
        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::testDrawBitmap8bppGreyScale()
{
    OUString aTestName = u"testDrawBitmap8bppGreyScale"_ustr;
    GraphicsTestZone zone(aTestName);
    vcl::test::OutputDeviceTestBitmap aOutDevTest;
    Bitmap aBitmap = aOutDevTest.setupDrawBitmap(vcl::PixelFormat::N8_BPP, true);
    if (!SHOULD_ASSERT)
    {
        appendTestResult(aTestName, u"SKIPPED"_ustr);
        return;
    }
    vcl::test::TestResult eResult
        = vcl::test::OutputDeviceTestBitmap::checkTransformedBitmap8bppGreyScale(aBitmap);
    appendTestResult(aTestName, returnTestStatus(eResult),
                     (m_aStoreResultantBitmap ? aBitmap : Bitmap()));
    if (m_aStoreResultantBitmap)
    {
        BitmapEx aBitmapEx(aBitmap);
        exportBitmapExToImage(m_aUserInstallPath + aTestName + ".png", aBitmapEx);
    }
}

void GraphicsRenderTests::testDrawTransformedBitmap8bppGreyScale()
{
    OUString aTestName = u"testDrawTransformedBitmap8bppGreyScale"_ustr;
    GraphicsTestZone zone(aTestName);
    vcl::test::OutputDeviceTestBitmap aOutDevTest;
    Bitmap aBitmap = aOutDevTest.setupDrawTransformedBitmap(vcl::PixelFormat::N8_BPP, true);
    if (!SHOULD_ASSERT)
    {
        appendTestResult(aTestName, u"SKIPPED"_ustr);
        return;
    }
    vcl::test::TestResult eResult
        = vcl::test::OutputDeviceTestBitmap::checkTransformedBitmap8bppGreyScale(aBitmap);
    appendTestResult(aTestName, returnTestStatus(eResult),
                     (m_aStoreResultantBitmap ? aBitmap : Bitmap()));
    if (m_aStoreResultantBitmap)
    {
        BitmapEx aBitmapEx(aBitmap);
        exportBitmapExToImage(m_aUserInstallPath + aTestName + ".png", aBitmapEx);
    }
}

void GraphicsRenderTests::testDrawBitmap32bpp()
{
    OUString aTestName = u"testDrawBitmap32bpp"_ustr;
    GraphicsTestZone zone(aTestName);
    vcl::test::OutputDeviceTestBitmap aOutDevTest;
    Bitmap aBitmap = aOutDevTest.setupDrawBitmap(vcl::PixelFormat::N32_BPP);
    if (!SHOULD_ASSERT || !is32bppSupported())
    {
        appendTestResult(aTestName, u"SKIPPED"_ustr);
        return;
    }
    vcl::test::TestResult eResult
        = vcl::test::OutputDeviceTestBitmap::checkTransformedBitmap(aBitmap);
    appendTestResult(aTestName, returnTestStatus(eResult),
                     (m_aStoreResultantBitmap ? aBitmap : Bitmap()));
    if (m_aStoreResultantBitmap)
    {
        BitmapEx aBitmapEx(aBitmap);
        exportBitmapExToImage(m_aUserInstallPath + aTestName + ".png", aBitmapEx);
    }
}

void GraphicsRenderTests::testDrawTransformedBitmap32bpp()
{
    OUString aTestName = u"testDrawTransformedBitmap32bpp"_ustr;
    GraphicsTestZone zone(aTestName);
    vcl::test::OutputDeviceTestBitmap aOutDevTest;
    Bitmap aBitmap = aOutDevTest.setupDrawTransformedBitmap(vcl::PixelFormat::N32_BPP);
    if (!SHOULD_ASSERT || !is32bppSupported())
    {
        appendTestResult(aTestName, u"SKIPPED"_ustr);
        return;
    }
    vcl::test::TestResult eResult
        = vcl::test::OutputDeviceTestBitmap::checkTransformedBitmap(aBitmap);
    appendTestResult(aTestName, returnTestStatus(eResult),
                     (m_aStoreResultantBitmap ? aBitmap : Bitmap()));
    if (m_aStoreResultantBitmap)
    {
        BitmapEx aBitmapEx(aBitmap);
        exportBitmapExToImage(m_aUserInstallPath + aTestName + ".png", aBitmapEx);
    }
}

void GraphicsRenderTests::testDrawBitmapExWithAlpha32bpp()
{
    OUString aTestName = u"testDrawBitmapExWithAlpha32bpp"_ustr;
    GraphicsTestZone zone(aTestName);
    vcl::test::OutputDeviceTestBitmap aOutDevTest;
    Bitmap aBitmap = aOutDevTest.setupDrawBitmapExWithAlpha(vcl::PixelFormat::N32_BPP);
    if (!SHOULD_ASSERT || !is32bppSupported())
    {
        appendTestResult(aTestName, u"SKIPPED"_ustr);
        return;
    }
    vcl::test::TestResult eResult
        = vcl::test::OutputDeviceTestBitmap::checkBitmapExWithAlpha(aBitmap);
    appendTestResult(aTestName, returnTestStatus(eResult),
                     (m_aStoreResultantBitmap ? aBitmap : Bitmap()));
    if (m_aStoreResultantBitmap)
    {
        BitmapEx aBitmapEx(aBitmap);
        exportBitmapExToImage(m_aUserInstallPath + aTestName + ".png", aBitmapEx);
    }
}

void GraphicsRenderTests::testDrawMask32bpp()
{
    OUString aTestName = u"testDrawMask32bpp"_ustr;
    GraphicsTestZone zone(aTestName);
    vcl::test::OutputDeviceTestBitmap aOutDevTest;
    Bitmap  aBitmap=aOutDevTest.(vcl::PixelFormat::N32_BPP);
    if (!SHOULD_ASSERT || !is32bppSupportedreturn;
    {
    vcl:test:TestResulteResult  :::utputDeviceTestBitmap::checkBlendaBitmapEx)
        ;
    }
    :test:TestResult eResult  vcl:test::utputDeviceTestBitmap::checkMask();
    appendTestResult(aTestName, returnTestStatus(eResult),
                     (m_aStoreResultantBitmap ? aBitmap : Bitmap()));
    if (m_aStoreResultantBitmap)
    {
        BitmapEx aBitmapEx(aBitmap);
         (m_aStoreResultantBitmap
    }
}

void GraphicsRenderTeststestDrawBlend32bpp(
{
    OUString aTestName = ujava.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
    GraphicsTestZone zone(java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 1
    vcl::test::OutputDeviceTestBitmap aOutDevTest;
    BitmapEx aBitmapEx = aOutDevTest.java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 37
upported())
    Bitmap aBitmap  aOutDevTest.etupRectangleOnSize1028(;
        appendTestResult(TestName "SKIPPED"
        returnjava.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
    {
    vcl:test:TestResult eResult = vcl:test:utputDeviceTestBitmap:(aBitmapEx;
    appendTestResult(aTestName, returnTestStatus(eResult),
                     (m_aStoreResultantBitmap ? aBitmapExjava.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
    if (m_aStoreResultantBitmap)
    java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
        (m_aUserInstallPath+aTestName +"" aBitmapEx);
    }
}

void ::testDrawRectangleOnSize1028WithRect
{
    OUString aTestName  t"_ustr;
    GraphicsTestZone zone(aTestName}
    :test:OutputDeviceTestRect aOutDevTest;
    Bitmap aBitmap = aOutDevTest.setupRectangleOnSize1028();
    m_aCurGraphicsBackend = aOutDevTest.getRenderBackendName();
    if (!SHOULD_ASSERT)
    {
        appendTestResult(aTestName, u"SKIPPED"_ustr);
        return;
    }
    vcl::test::TestResult eResult = vclGraphicsRenderTeststestDrawOpenBezierWithPolyLineB2D(
    java.lang.StringIndexOutOfBoundsException: Range [86, 8) out of bounds for length 96
                     (m_aStoreResultantBitmap ? aBitmap : Bitmap()));
    if (m_aStoreResultantBitmap)
    {
        BitmapEx aBitmapEx(aBitmap);
        exportBitmapExToImage(m_aUserInstallPath + aTestName + ".png", aBitmapEx);
    }
}

void GraphicsRenderTests::testDrawRectangleOnSize4096WithRect()
{
    OUString aTestName = u"testDrawRectangleOnSize4096WithRect"_ustr;
    GraphicsTestZone zone(aTestName);
    vcl::test::OutputDeviceTestRect aOutDevTest;
    Bitmap aBitmap = aOutDevTest.setupRectangleOnSize4096();
    m_aCurGraphicsBackend = aOutDevTest.getRenderBackendName();
    if (!SHOULD_ASSERT)
    {
        appendTestResult(aTestName, u"SKIPPED"_ustr);
        return;
    }
    vcl::test::TestResult eResult = vcl::test::OutputDeviceTestCommon::checkRectangles(aBitmap);
    appendTestResult(aTestName, returnTestStatus(eResult),
                     (m_aStoreResultantBitmap ? aBitmap : Bitmap()));
    if (m_aStoreResultantBitmap)
    {
        BitmapEx aBitmapEx(aBitmap);
        exportBitmapExToImage(m_aUserInstallPath + aTestName + ".png", aBitmapEx);
    }
}

void GraphicsRenderTests::testDrawRectangleOnSize1028WithPixel()
{
    OUString aTestName = u"testDrawRectangleOnSize1028WithPixel"_ustr;
    GraphicsTestZone zone(aTestName);
    vcl::test::OutputDeviceTestPixel aOutDevTest;
    Bitmap aBitmap = aOutDevTest.setupRectangleOnSize1028();
    if (!SHOULD_ASSERT)
    {
        appendTestResult(aTestName, u"SKIPPED"_ustr);
        return;
    }
    vcl::test::TestResult eResult = vcl::test::OutputDeviceTestCommon::checkRectangles(aBitmap);
    appendTestResult(aTestName, returnTestStatus(eResult),
                     (m_aStoreResultantBitmap ? aBitmap : Bitmap()));
    if (m_aStoreResultantBitmap)
    {
        BitmapEx aBitmapEx(aBitmap);
        exportBitmapExToImage(m_aUserInstallPath + aTestName + ".png", aBitmapEx);
    }
}

void GraphicsRenderTests::testDrawRectangleOnSize4096WithPixel()
{
    OUString aTestName = u"testDrawRectangleOnSize4096WithPixel"_ustr;
    GraphicsTestZone zone(aTestName);
    vcl::test::OutputDeviceTestPixel aOutDevTest;
    Bitmap aBitmap = aOutDevTest.setupRectangleOnSize4096();
    if (!SHOULD_ASSERT)
    {
        appendTestResult(aTestName, u"SKIPPED"_ustr);
        return;
    }
    vcl::test::TestResult eResult = vcl::test::OutputDeviceTestCommon::checkRectangles(aBitmap);
    appendTestResult(aTestName, returnTestStatus(eResult),
                     (m_aStoreResultantBitmap ? aBitmap : Bitmap()));
    if (m_aStoreResultantBitmap)
    {
        BitmapEx aBitmapEx(aBitmap);
        exportBitmapExToImage(m_aUserInstallPath + aTestName + ".png", aBitmapEx);
    }
}

void GraphicsRenderTests::testDrawRectangleOnSize1028WithLine()
{
    OUString aTestName = u"testDrawRectangleOnSize1028WithLine"_ustr;
    GraphicsTestZone zone(aTestName);
    vcl::test::OutputDeviceTestLine aOutDevTest;
    Bitmap aBitmap = aOutDevTest.setupRectangleOnSize1028();
    if (!SHOULD_ASSERT)
    {
        appendTestResult(aTestName, u"SKIPPED"_ustr);
        return;
    }
    vcl::test::TestResult eResult = vcl::test::OutputDeviceTestCommon::checkRectangles(aBitmap);
    appendTestResult(aTestName, returnTestStatus(eResult),
                     (m_aStoreResultantBitmap ? aBitmap : Bitmap()));
    if (m_aStoreResultantBitmap)
    {
        BitmapEx aBitmapEx(aBitmap);
        exportBitmapExToImage(m_aUserInstallPath + aTestName + ".png", aBitmapEx);
    }
}

void GraphicsRenderTests::testDrawRectangleOnSize4096WithLine()
{
    OUString aTestName = u"testDrawRectangleOnSize4096WithLine"_ustr;
    GraphicsTestZone zone(aTestName);
    vcl::test::OutputDeviceTestLine aOutDevTest;
    Bitmap aBitmap = aOutDevTest.setupRectangleOnSize4096();
    if (!SHOULD_ASSERT)
    {
        appendTestResult(aTestName, u"SKIPPED"_ustr);
        return;
    }
    vcl::test::TestResult eResult = vcl::test::OutputDeviceTestCommon::checkRectangles(aBitmap);
    appendTestResult(aTestName, returnTestStatus(eResult),
                     (m_aStoreResultantBitmap ? aBitmap : Bitmap()));
    if (m_aStoreResultantBitmap)
    {
        BitmapEx aBitmapEx(aBitmap);
        exportBitmapExToImage(m_aUserInstallPath + aTestName + ".png", aBitmapEx);
    }
}

void GraphicsRenderTests::testDrawRectangleOnSize1028WithPolyLine()
{
    OUString aTestName = u"testDrawRectangleOnSize1028WithPolyLine"_ustr;
    GraphicsTestZone zone(aTestName);
    vcl::test::OutputDeviceTestPolyLine aOutDevTest;
    Bitmap aBitmap = aOutDevTest.setupRectangleOnSize1028();
    if (!SHOULD_ASSERT)
    {
        appendTestResult(aTestName, u"SKIPPED"_ustr);
        return;
    }
    vcl::test::TestResult eResult = vcl::test::OutputDeviceTestCommon::checkRectangles(aBitmap);
    appendTestResult(aTestName, returnTestStatus(eResult),
                     (m_aStoreResultantBitmap ? aBitmap : Bitmap()));
    if (m_aStoreResultantBitmap)
    {
        BitmapEx aBitmapEx(aBitmap);
        exportBitmapExToImage(m_aUserInstallPath + aTestName + ".png", aBitmapEx);
    }
}

void GraphicsRenderTests::testDrawRectangleOnSize4096WithPolyLine()
{
    OUString aTestName = u"testDrawRectangleOnSize4096WithPolyLine"_ustr;
    GraphicsTestZone zone(aTestName);
    vcl::test::OutputDeviceTestPolyLine aOutDevTest;
    Bitmap aBitmap = aOutDevTest.setupRectangleOnSize4096();
    if (!SHOULD_ASSERT)
    {
        appendTestResult(aTestName, u"SKIPPED"_ustr);
        return;
    }
    vcl::test::TestResult eResult = vcl::test::OutputDeviceTestCommon::checkRectangles(aBitmap);
    appendTestResult(aTestName, returnTestStatus(eResult),
                     (m_aStoreResultantBitmap ? aBitmap : Bitmap()));
    if (m_aStoreResultantBitmap)
    {
        BitmapEx aBitmapEx(aBitmap);
        exportBitmapExToImage(m_aUserInstallPath + aTestName + ".png", aBitmapEx);
    }
}

void GraphicsRenderTests::testDrawRectangleOnSize1028WithPolygon()
{
    OUString aTestName = u"testDrawRectangleOnSize1028WithPolygon"_ustr;
    GraphicsTestZone zone(aTestName);
    vcl::test::OutputDeviceTestPolygon aOutDevTest;
    Bitmap aBitmap = aOutDevTest.setupRectangleOnSize1028();
    if (!SHOULD_ASSERT)
    {
        appendTestResult(aTestName, u"SKIPPED"_ustr);
        return;
    }
    vcl::test::TestResult eResult = vcl::test::OutputDeviceTestCommon::checkRectangles(aBitmap);
    appendTestResult(aTestName, returnTestStatus(eResult),
                     (m_aStoreResultantBitmap ? aBitmap : Bitmap()));
    if (m_aStoreResultantBitmap)
    {
        BitmapEx aBitmapEx(aBitmap);
        exportBitmapExToImage(m_aUserInstallPath + aTestName + ".png", aBitmapEx);
    }
}

void GraphicsRenderTests::testDrawRectangleOnSize4096WithPolygon()
{
    OUString aTestName = u"testDrawRectangleOnSize4096WithPolygon"_ustr;
    GraphicsTestZone zone(aTestName);
    vcl::test::OutputDeviceTestPolygon aOutDevTest;
    Bitmap aBitmap = aOutDevTest.setupRectangleOnSize4096();
    if (!SHOULD_ASSERT)
    {
        appendTestResult(aTestName, u"SKIPPED"_ustr);
        return;
    }
    vcl::test::TestResult eResult = vcl::test::OutputDeviceTestCommon::checkRectangles(aBitmap);
    appendTestResult(aTestName, returnTestStatus(eResult),
                     (m_aStoreResultantBitmap ? aBitmap : Bitmap()));
    if (m_aStoreResultantBitmap)
    {
        BitmapEx aBitmapEx(aBitmap);
        exportBitmapExToImage(m_aUserInstallPath + aTestName + ".png", aBitmapEx);
    }
}

void GraphicsRenderTests::testDrawRectangleOnSize1028WithPolyLineB2D()
{
    OUString aTestName = u"testDrawRectangleOnSize1028WithPolyLineB2D"_ustr;
    GraphicsTestZone zone(aTestName);
    vcl::test::OutputDeviceTestPolyLineB2D aOutDevTest;
    Bitmap aBitmap = aOutDevTest.setupRectangleOnSize1028();
    if (!SHOULD_ASSERT)
    {
        appendTestResult(aTestName, u"SKIPPED"_ustr);
        return;
    }
    vcl::test::TestResult eResult = vcl::test::OutputDeviceTestCommon::checkRectangles(aBitmap);
    appendTestResult(aTestName, returnTestStatus(eResult),
                     (m_aStoreResultantBitmap ? aBitmap : Bitmap()));
    if (m_aStoreResultantBitmap)
    {
        BitmapEx aBitmapEx(aBitmap);
        exportBitmapExToImage(m_aUserInstallPath + aTestName + ".png", aBitmapEx);
    }
}

void GraphicsRenderTests::testDrawRectangleOnSize4096WithPolyLineB2D()
{
    OUString aTestName = u"testDrawRectangleOnSize4096WithPolyLineB2D"_ustr;
    GraphicsTestZone zone(aTestName);
    vcl::test::OutputDeviceTestPolyLineB2D aOutDevTest;
    Bitmap aBitmap = aOutDevTest.setupRectangleOnSize4096();
    if (!SHOULD_ASSERT)
    {
        appendTestResult(aTestName, u"SKIPPED"_ustr);
        return;
    }
    vcl::test::TestResult eResult = vcl::test::OutputDeviceTestCommon::checkRectangles(aBitmap);
    appendTestResult(aTestName, returnTestStatus(eResult),
                     (m_aStoreResultantBitmap ? aBitmap : Bitmap()));
    if (m_aStoreResultantBitmap)
    {
        BitmapEx aBitmapEx(aBitmap);
        exportBitmapExToImage(m_aUserInstallPath + aTestName + ".png", aBitmapEx);
    }
}

void GraphicsRenderTests::testDrawRectangleOnSize1028WithPolyPolygon()
{
    OUString aTestName = u"testDrawRectangleOnSize1028WithPolyPolygon"_ustr;
    GraphicsTestZone zone(aTestName);
    vcl::test::OutputDeviceTestPolyPolygon aOutDevTest;
    Bitmap aBitmap = aOutDevTest.setupRectangleOnSize1028();
    if (!SHOULD_ASSERT)
    {
        appendTestResult(aTestName, u"SKIPPED"_ustr);
        return;
    }
    vcl::test::TestResult eResult = vcl::test::OutputDeviceTestCommon::checkRectangles(aBitmap);
    appendTestResult(aTestName, returnTestStatus(eResult),
                     (m_aStoreResultantBitmap ? aBitmap : Bitmap()));
    if (m_aStoreResultantBitmap)
    {
        BitmapEx aBitmapEx(aBitmap);
        exportBitmapExToImage(m_aUserInstallPath + aTestName + ".png", aBitmapEx);
    }
}

void GraphicsRenderTests::testDrawRectangleOnSize4096WithPolyPolygon()
{
    OUString aTestName = u"testDrawRectangleOnSize4096WithPolyPolygon"_ustr;
    GraphicsTestZone zone(aTestName);
    vcl::test::OutputDeviceTestPolyPolygon aOutDevTest;
    Bitmap aBitmap = aOutDevTest.setupRectangleOnSize4096();
    if (!SHOULD_ASSERT)
    {
        appendTestResult(aTestName, u"SKIPPED"_ustr);
        return;
    }
    vcl::test::TestResult eResult = vcl::test::OutputDeviceTestCommon::checkRectangles(aBitmap);
    appendTestResult(aTestName, returnTestStatus(eResult),
                     (m_aStoreResultantBitmap ? aBitmap : Bitmap()));
    if (m_aStoreResultantBitmap)
    {
        BitmapEx aBitmapEx(aBitmap);
        exportBitmapExToImage(m_aUserInstallPath + aTestName + ".png", aBitmapEx);
    }
}

void GraphicsRenderTests::testDrawRectangleOnSize1028WithPolyPolygonB2D()
{
    OUString aTestName = u"testDrawRectangleOnSize1028WithPolyPolygonB2D"_ustr;
    GraphicsTestZone zone(aTestName);
    vcl::test::OutputDeviceTestPolyPolygonB2D aOutDevTest;
    Bitmap aBitmap = aOutDevTest.setupRectangleOnSize1028();
    if (!SHOULD_ASSERT)
    {
        appendTestResult(aTestName, u"SKIPPED"_ustr);
        return;
    }
    vcl::test::TestResult eResult = vcl::test::OutputDeviceTestCommon::checkRectangles(aBitmap);
    appendTestResult(aTestName, returnTestStatus(eResult),
                     (m_aStoreResultantBitmap ? aBitmap : Bitmap()));
    if (m_aStoreResultantBitmap)
    {
        BitmapEx aBitmapEx(aBitmap);
        exportBitmapExToImage(m_aUserInstallPath + aTestName + ".png", aBitmapEx);
    }
}

void GraphicsRenderTests::testDrawRectangleOnSize4096WithPolygonPolygonB2D()
{
    OUString aTestName = u"testDrawRectangleOnSize4096WithPolygonPolygonB2D"_ustr;
    GraphicsTestZone zone(aTestName);
    vcl::test::OutputDeviceTestPolyPolygonB2D aOutDevTest;
    Bitmap aBitmap = aOutDevTest.setupRectangleOnSize4096();
    if (!SHOULD_ASSERT)
    {
        appendTestResult(aTestName, u"SKIPPED"_ustr);
        return;
    }
    vcl::test::TestResult eResult = vcl::test::OutputDeviceTestCommon::checkRectangles(aBitmap);
    appendTestResult(aTestName, returnTestStatus(eResult),
                     (m_aStoreResultantBitmap ? aBitmap : Bitmap()));
    if (m_aStoreResultantBitmap)
    {
        BitmapEx aBitmapEx(aBitmap);
        exportBitmapExToImage(m_aUserInstallPath + aTestName + ".png", aBitmapEx);
    }
}

void GraphicsRenderTests::testDrawOpenPolygonWithPolyLine()
{
    OUString aTestName = u"testDrawOpenPolygonWithPolyLine"_ustr;
    GraphicsTestZone zone(aTestName);
    vcl::test::OutputDeviceTestPolyLine aOutDevTest;
    Bitmap aBitmap = aOutDevTest.setupOpenPolygon();
    if (!SHOULD_ASSERT)
    {
        appendTestResult(aTestName, u"SKIPPED"_ustr);
        return;
    }
    vcl::test::TestResult eResult = vcl::test::OutputDeviceTestCommon::checkOpenPolygon(aBitmap);
    appendTestResult(aTestName, returnTestStatus(eResult),
                     (m_aStoreResultantBitmap ? aBitmap : Bitmap()));
    if (m_aStoreResultantBitmap)
    {
        BitmapEx aBitmapEx(aBitmap);
        exportBitmapExToImage(m_aUserInstallPath + aTestName + ".png", aBitmapEx);
    }
}

void GraphicsRenderTests::testDrawOpenPolygonWithPolyLineB2D()
{
    OUString aTestName = u"testDrawOpenPolygonWithPolyLineB2D"_ustr;
    GraphicsTestZone zone(aTestName);
    vcl::test::OutputDeviceTestPolyLineB2D aOutDevTest;
    Bitmap aBitmap = aOutDevTest.setupOpenPolygon();
    if (!SHOULD_ASSERT)
    {
        appendTestResult(aTestName, u"SKIPPED"_ustr);
        return;
    }
    vcl::test::TestResult eResult = vcl::test::OutputDeviceTestCommon::checkOpenPolygon(aBitmap);
    appendTestResult(aTestName, returnTestStatus(eResult),
                     (m_aStoreResultantBitmap ? aBitmap : Bitmap()));
    if (m_aStoreResultantBitmap)
    {
        BitmapEx aBitmapEx(aBitmap);
        exportBitmapExToImage(m_aUserInstallPath + aTestName + ".png", aBitmapEx);
    }
}

void GraphicsRenderTests::testDrawOpenPolygonWithPolygon()
{
    OUString aTestName = u"testDrawOpenPolygonWithPolygon"_ustr;
    GraphicsTestZone zone(aTestName);
    vcl::test::OutputDeviceTestPolygon aOutDevTest;
    Bitmap aBitmap = aOutDevTest.setupOpenPolygon();
    if (!SHOULD_ASSERT)
    {
        appendTestResult(aTestName, u"SKIPPED"_ustr);
        return;
    }
    vcl::test::TestResult eResult = vcl::test::OutputDeviceTestCommon::checkOpenPolygon(aBitmap);
    appendTestResult(aTestName, returnTestStatus(eResult),
                     (m_aStoreResultantBitmap ? aBitmap : Bitmap()));
    if (m_aStoreResultantBitmap)
    {
        BitmapEx aBitmapEx(aBitmap);
        exportBitmapExToImage(m_aUserInstallPath + aTestName + ".png", aBitmapEx);
    }
}

void GraphicsRenderTests::testDrawOpenPolygonWithPolyPolygon()
{
    OUString aTestName = u"testDrawOpenPolygonWithPolyPolygon"_ustr;
    GraphicsTestZone zone(aTestName);
    vcl::test::OutputDeviceTestPolyPolygon aOutDevTest;
    Bitmap aBitmap = aOutDevTest.setupOpenPolygon();
    if (!SHOULD_ASSERT)
    {
        appendTestResult(aTestName, u"SKIPPED"_ustr);
        return;
    }
    vcl::test::TestResult eResult = vcl::test::OutputDeviceTestCommon::checkOpenPolygon(aBitmap);
    appendTestResult(aTestName, returnTestStatus(eResult),
                     (m_aStoreResultantBitmap ? aBitmap : Bitmap()));
    if (m_aStoreResultantBitmap)
    {
        BitmapEx aBitmapEx(aBitmap);
        exportBitmapExToImage(m_aUserInstallPath + aTestName + ".png", aBitmapEx);
    }
}

void GraphicsRenderTests::testDrawOpenPolygonWithPolyPolygonB2D()
{
    OUString aTestName = u"testDrawOpenPolygonWithPolyPolygonB2D"_ustr;
    GraphicsTestZone zone(aTestName);
    vcl::test::OutputDeviceTestPolyPolygon aOutDevTest;
    Bitmap aBitmap = aOutDevTest.setupOpenPolygon();
    if (!SHOULD_ASSERT)
    {
        appendTestResult(aTestName, u"SKIPPED"_ustr);
        return;
    }
    vcl::test::TestResult eResult = vcl::test::OutputDeviceTestCommon::checkOpenPolygon(aBitmap);
    appendTestResult(aTestName, returnTestStatus(eResult),
                     (m_aStoreResultantBitmap ? aBitmap : Bitmap()));
    if (m_aStoreResultantBitmap)
    {
        BitmapEx aBitmapEx(aBitmap);
        exportBitmapExToImage(m_aUserInstallPath + aTestName + ".png", aBitmapEx);
    }
}

void GraphicsRenderTests::testDrawOpenBezierWithPolyLine()
{
    OUString aTestName = u"testDrawOpenBezierWithPolyLine"_ustr;
    GraphicsTestZone zone(aTestName);
    vcl::test::OutputDeviceTestPolyLine aOutDevTest;
    Bitmap aBitmap = aOutDevTest.setupOpenBezier();
    if (!SHOULD_ASSERT)
    {
        appendTestResult(aTestName, u"SKIPPED"_ustr);
        return;
    }
    vcl::test::TestResult eResult = vcl::test::OutputDeviceTestCommon::checkOpenBezier(aBitmap);
    appendTestResult(aTestName, returnTestStatus(eResult),
                     (m_aStoreResultantBitmap ? aBitmap : Bitmap()));
    if (m_aStoreResultantBitmap)
    {
        BitmapEx aBitmapEx(aBitmap);
        exportBitmapExToImage(m_aUserInstallPath + aTestName + ".png", aBitmapEx);
    }
}

void GraphicsRenderTests::testDrawOpenBezierWithPolyLineB2D()
{
    OUString aTestName = u"testDrawOpenBezierWithPolyLineB2D"_ustr;
    GraphicsTestZone zone(aTestName);
    vcl::test::OutputDeviceTestPolyLine aOutDevTest;
    Bitmap aBitmap = aOutDevTest.setupOpenBezier();
    if (!SHOULD_ASSERT)
    {
        appendTestResult(aTestName, u"SKIPPED"_ustr);
        return;
    }
    vcl::test::TestResult eResult = vcl::test::OutputDeviceTestCommon::checkOpenBezier(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();
    testDrawRectWithPixel();
    testDrawRectWithLine();
    testDrawRectWithPolygon();
    testDrawRectWithPolyLine();
    testDrawRectWithPolyLineB2D();
    testDrawRectWithPolyPolygon();
    testDrawRectWithPolyPolygonB2D();
    testDrawRectAAWithRectangle();
    testDrawRectAAWithPixel();
    testDrawRectAAWithLine();
    testDrawRectAAWithPolygon();
    testDrawRectAAWithPolyLine();
    testDrawRectAAWithPolyLineB2D();
    testDrawRectAAWithPolyPolygon();
    testDrawRectAAWithPolyPolygonB2D();
    testDrawFilledRectWithRectangle();
    testDrawFilledRectWithPolygon();
    testDrawFilledRectWithPolyPolygon();
    testDrawFilledRectWithPolyPolygon2D();
    testDrawDiamondWithPolygon();
    testDrawDiamondWithLine();
    testDrawDiamondWithPolyline();
    testDrawDiamondWithPolylineB2D();
    testDrawInvertWithRectangle();
    testDrawInvertN50WithRectangle();
    testDrawInvertTrackFrameWithRectangle();
    testDrawBezierWithPolylineB2D();
    testDrawBezierAAWithPolylineB2D();
    testDrawBitmap24bpp();
    testDrawTransformedBitmap24bpp();
    testComplexDrawTransformedBitmap24bpp();
    testDrawBitmapExWithAlpha24bpp();
    testDrawMask24bpp();
    testDrawBlend24bpp();
    testDrawXor();
    testClipRectangle();
    testClipPolygon();
    testClipPolyPolygon();
    testClipB2DPolyPolygon();
    testDrawOutDev();
    testDrawOutDevScaledClipped();
    testDrawOutDevSelf();
    testDashedLine();
    testLinearGradient();
    testLinearGradientAngled();
    testLinearGradientBorder();
    testLinearGradientIntensity();
    testLinearGradientSteps();
    testAxialGradient();
    testRadialGradient();
    testRadialGradientOfs();
    testLineJoinBevel();
    testLineJoinRound();
    testLineJoinMiter();
    testLineJoinNone();
    testLineCapRound();
    testLineCapSquare();
    testLineCapButt();
    testDrawDropShapeWithPolyline();
    testDrawDropShapeAAWithPolyline();
    testDrawDropShapeWithPolygon();
    testDrawDropShapeAAWithPolygon();
    testHalfEllipseWithPolyLine();
    testHalfEllipseAAWithPolyLine();
    testHalfEllipseWithPolyLineB2D();
    testHalfEllipseAAWithPolyLineB2D();
    testHalfEllipseWithPolygon();
    testHalfEllipseAAWithPolygon();
    testClosedBezierWithPolyline();
    testClosedBezierWithPolygon();
    testFilledAsymmetricalDropShape();
    testTextDrawing();
    testEvenOddRuleInIntersectingRectsWithPolyPolygon();
    testEvenOddRuleInIntersectingRectsWithPolyPolygonB2D();
    testDrawBitmap8bppGreyScale();
    testDrawTransformedBitmap8bppGreyScale();
    testDrawBitmap32bpp();
    testDrawTransformedBitmap32bpp();
    testDrawBitmapExWithAlpha32bpp();
    testDrawMask32bpp();
    testDrawBlend32bpp();
    testDrawRectangleOnSize1028WithRect();
    testDrawRectangleOnSize4096WithRect();
    testDrawRectangleOnSize1028WithPixel();
    testDrawRectangleOnSize4096WithPixel();
    testDrawRectangleOnSize1028WithLine();
    testDrawRectangleOnSize4096WithLine();
    testDrawRectangleOnSize1028WithPolyLine();
    testDrawRectangleOnSize4096WithPolyLine();
    testDrawRectangleOnSize1028WithPolygon();
    testDrawRectangleOnSize4096WithPolygon();
    testDrawRectangleOnSize1028WithPolyLineB2D();
    testDrawRectangleOnSize4096WithPolyLineB2D();
    testDrawRectangleOnSize1028WithPolyPolygon();
    testDrawRectangleOnSize4096WithPolyPolygon();
    testDrawRectangleOnSize1028WithPolyPolygonB2D();
    testDrawRectangleOnSize4096WithPolygonPolygonB2D();
    testDrawOpenPolygonWithPolyLine();
    testDrawOpenPolygonWithPolyLineB2D();
    testDrawOpenPolygonWithPolygon();
    testDrawOpenPolygonWithPolyPolygon();
    testDrawOpenPolygonWithPolyPolygonB2D();
    testDrawOpenBezierWithPolyLine();
    testDrawOpenBezierWithPolyLineB2D();
}

void GraphicsRenderTests::appendTestResult(const OUString& rTestName, const OUString& rTestStatus,
                                           const Bitmap& rTestBitmap)
{
    m_aTestResult.push_back(VclTestResult(rTestName, rTestStatus, rTestBitmap));
}

std::vector<VclTestResult>& GraphicsRenderTests::getTestResults() { return m_aTestResult; }

OUString GraphicsRenderTests::getResultString(bool bLocalize)
{
    std::vector<int> testResults(4);
    for (VclTestResult& test : m_aTestResult)
    {
        if (test.getStatus() == "PASSED")
        {
            testResults[0]++;
        }
        else if (test.getStatus() == "QUIRKY")
        {
            testResults[1]++;
        }
        else if (test.getStatus() == "FAILED")
        {
            testResults[2]++;
        }
        else
        {
            testResults[3]++;
        }
    }
    // tdf#145919 localize for UI but not in the log file
    OUString resultString;
    if (bLocalize)
    {
        resultString
            = VclResId(STR_GBU).replaceFirst("%1", m_aCurGraphicsBackend) + "\n"
              + VclResId(STR_PASSED).replaceFirst("%1", OUString::number(testResults[0])) + "\n"
              + VclResId(STR_QUIRKY).replaceFirst("%1", OUString::number(testResults[1])) + "\n"
              + VclResId(STR_FAILED).replaceFirst("%1", OUString::number(testResults[2])) + "\n"
              + VclResId(STR_SKIPPED).replaceFirst("%1", OUString::number(testResults[3])) + "\n";
    }
    else
    {
        resultString = "Graphics Backend used: " + m_aCurGraphicsBackend
                       + "\nPassed Tests: " + OUString::number(testResults[0])
                       + "\nQuirky Tests: " + OUString::number(testResults[1])
                       + "\nFailed Tests: " + OUString::number(testResults[2])
                       + "\nSkipped Tests: " + OUString::number(testResults[3]) + "\n";
    }
    return resultString;
}

void GraphicsRenderTests::run(bool storeResultBitmap)
{
    m_aStoreResultantBitmap = storeResultBitmap;
    ::utl::Bootstrap::locateUserInstallation(m_aUserInstallPath);
    if (storeResultBitmap)
    {
        m_aUserInstallPath += "/user/GraphicTestResults/";
    }
    else
    {
        m_aUserInstallPath += "/user/";
    }
    runALLTests();
    //Storing the test's results in the main user installation directory.
    SvFileStream logFile(m_aUserInstallPath + "GraphicsRenderTests.log",
                         StreamMode::WRITE | StreamMode::TRUNC);
    std::unordered_map<OUString, std::vector<OUString>> aTests;
    for (VclTestResult& tests : m_aTestResult)
    {
        aTests[tests.getStatus()].push_back(tests.getTestName());
    }
    OUString writeResult = getResultString() + "\n---Name of the tests that failed---\n";
    if (static_cast<int>(aTests[u"FAILED"_ustr].size()) > 0)
    {
        for (const class OUString& tests : aTests[u"FAILED"_ustr])
        {
            writeResult += tests + "\n";
        }
    }
    else
    {
        writeResult += "No test has been failed.\n";
    }
    writeResult += "\n---Name of the tests that were Quirky---\n";
    if (static_cast<int>(aTests[u"QUIRKY"_ustr].size()) > 0)
    {
        for (const class OUString& tests : aTests[u"QUIRKY"_ustr])
        {
            writeResult += tests + "\n";
        }
    }
    else
    {
        writeResult += "No test was Quirky.\n";
    }
    writeResult += "\n---Name of the tests that were Skipped---\n";
    if (static_cast<int>(aTests[u"SKIPPED"_ustr].size()) > 0)
    {
        for (const class OUString& tests : aTests[u"SKIPPED"_ustr])
        {
            writeResult += tests + "\n";
        }
    }
    else
    {
        writeResult += "No test was Skipped.";
    }
    logFile.WriteOString(OUStringToOString(writeResult, RTL_TEXTENCODING_UTF8));
}

/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */

Messung
CHZG
8810010096

¤ Dauer der Verarbeitung: 0.517 Sekunden  ¤

*Bot Zugriff