workaround segfault in compiler on macos-clang-intel
[LibreOffice.git] / include / vcl / test / GraphicsRenderTests.hxx
blobd8242b95303993314372cca61b5f0a193403f94a
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 */
10 #pragma once
12 #include <utility>
13 #include <vcl/bitmap.hxx>
14 #include <vcl/dllapi.h>
15 #include <vcl/test/TestResult.hxx>
17 #include <vector>
19 class VCL_PLUGIN_PUBLIC VclTestResult
21 OUString m_aTestName;
22 //For storing the result of the test.
23 OUString m_aTestStatus;
24 //For storing the resultant bitmap correspondingly to the test.
25 Bitmap m_aResultantBitmap;
27 public:
28 VclTestResult(OUString atestName, OUString atestStatus, Bitmap atestBitmap)
29 : m_aTestName(std::move(atestName))
30 , m_aTestStatus(std::move(atestStatus))
31 , m_aResultantBitmap(atestBitmap)
34 const OUString& getTestName() const { return m_aTestName; }
35 OUString getStatus(bool bLocalize = false);
36 const Bitmap& getBitmap() const { return m_aResultantBitmap; }
39 class SAL_DLLPUBLIC_RTTI GraphicsRenderTests
41 bool m_aStoreResultantBitmap;
43 //For storing the test's info
44 std::vector<VclTestResult> m_aTestResult;
45 //For storing the current graphics Backend in use.
46 OUString m_aCurGraphicsBackend;
47 //Location where the results should be stored.
48 OUString m_aUserInstallPath;
50 void testDrawRectWithRectangle();
51 void testDrawRectWithPixel();
52 void testDrawRectWithLine();
53 void testDrawRectWithPolygon();
54 void testDrawRectWithPolyLine();
55 void testDrawRectWithPolyLineB2D();
56 void testDrawRectWithPolyPolygon();
57 void testDrawRectWithPolyPolygonB2D();
58 void testDrawRectAAWithRectangle();
59 void testDrawRectAAWithPixel();
60 void testDrawRectAAWithLine();
61 void testDrawRectAAWithPolygon();
62 void testDrawRectAAWithPolyLine();
63 void testDrawRectAAWithPolyLineB2D();
64 void testDrawRectAAWithPolyPolygon();
65 void testDrawRectAAWithPolyPolygonB2D();
66 void testDrawFilledRectWithRectangle();
67 void testDrawFilledRectWithPolygon();
68 void testDrawFilledRectWithPolyPolygon();
69 void testDrawFilledRectWithPolyPolygon2D();
70 void testDrawDiamondWithPolygon();
71 void testDrawDiamondWithLine();
72 void testDrawDiamondWithPolyline();
73 void testDrawDiamondWithPolylineB2D();
74 void testDrawInvertWithRectangle();
75 void testDrawInvertN50WithRectangle();
76 void testDrawInvertTrackFrameWithRectangle();
77 void testDrawDropShapeWithPolyline();
78 void testDrawDropShapeAAWithPolyline();
79 void testDrawBezierWithPolylineB2D();
80 void testDrawBezierAAWithPolylineB2D();
81 void testDrawDropShapeWithPolygon();
82 void testDrawDropShapeAAWithPolygon();
83 void testDrawBitmap24bpp();
84 void testDrawTransformedBitmap24bpp();
85 void testComplexDrawTransformedBitmap24bpp();
86 void testDrawBitmapExWithAlpha24bpp();
87 void testDrawMask24bpp();
88 void testDrawBlend24bpp();
89 void testDrawBitmap32bpp();
90 void testDrawTransformedBitmap32bpp();
91 void testDrawBitmapExWithAlpha32bpp();
92 void testDrawMask32bpp();
93 void testDrawBlend32bpp();
94 void testDrawBitmap8bppGreyScale();
95 void testDrawTransformedBitmap8bppGreyScale();
96 void testDrawXor();
97 void testClipRectangle();
98 void testClipPolygon();
99 void testClipPolyPolygon();
100 void testClipB2DPolyPolygon();
101 void testDrawOutDev();
102 void testDrawOutDevScaledClipped();
103 void testDrawOutDevSelf();
104 void testDashedLine();
105 void testLinearGradient();
106 void testLinearGradientAngled();
107 void testLinearGradientBorder();
108 void testLinearGradientIntensity();
109 void testLinearGradientSteps();
110 void testAxialGradient();
111 void testRadialGradient();
112 void testRadialGradientOfs();
113 void testLineJoinBevel();
114 void testLineJoinRound();
115 void testLineJoinMiter();
116 void testLineJoinNone();
117 void testLineCapRound();
118 void testLineCapSquare();
119 void testLineCapButt();
120 void testHalfEllipseWithPolyLine();
121 void testHalfEllipseAAWithPolyLine();
122 void testHalfEllipseWithPolyLineB2D();
123 void testHalfEllipseAAWithPolyLineB2D();
124 void testHalfEllipseWithPolygon();
125 void testHalfEllipseAAWithPolygon();
126 void testClosedBezierWithPolyline();
127 void testClosedBezierWithPolygon();
128 void testFilledAsymmetricalDropShape();
129 void testTextDrawing();
130 void testEvenOddRuleInIntersectingRectsWithPolyPolygon();
131 void testEvenOddRuleInIntersectingRectsWithPolyPolygonB2D();
132 void testDrawRectangleOnSize1028WithRect();
133 void testDrawRectangleOnSize4096WithRect();
134 void testDrawRectangleOnSize1028WithPixel();
135 void testDrawRectangleOnSize4096WithPixel();
136 void testDrawRectangleOnSize1028WithLine();
137 void testDrawRectangleOnSize4096WithLine();
138 void testDrawRectangleOnSize1028WithPolygon();
139 void testDrawRectangleOnSize4096WithPolygon();
140 void testDrawRectangleOnSize1028WithPolyLine();
141 void testDrawRectangleOnSize4096WithPolyLine();
142 void testDrawRectangleOnSize1028WithPolyLineB2D();
143 void testDrawRectangleOnSize4096WithPolyLineB2D();
144 void testDrawRectangleOnSize1028WithPolyPolygon();
145 void testDrawRectangleOnSize4096WithPolyPolygon();
146 void testDrawRectangleOnSize1028WithPolyPolygonB2D();
147 void testDrawRectangleOnSize4096WithPolygonPolygonB2D();
148 void testDrawOpenPolygonWithPolyLine();
149 void testDrawOpenPolygonWithPolyLineB2D();
150 void testDrawOpenPolygonWithPolygon();
151 void testDrawOpenPolygonWithPolyPolygon();
152 void testDrawOpenPolygonWithPolyPolygonB2D();
153 void testDrawOpenBezierWithPolyLine();
154 void testDrawOpenBezierWithPolyLineB2D();
155 static OUString returnTestStatus(vcl::test::TestResult const result);
156 void runALLTests();
157 void appendTestResult(const OUString& rTestName, const OUString& rTestStatus,
158 const Bitmap& rTestBitmap = Bitmap());
160 public:
161 VCL_PLUGIN_PUBLIC std::vector<VclTestResult>& getTestResults();
162 VCL_PLUGIN_PUBLIC OUString getResultString(bool bLocalize = false);
163 VCL_PLUGIN_PUBLIC void run(bool storeResultBitmap = false);
165 GraphicsRenderTests()
166 : m_aStoreResultantBitmap(false)
171 /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */