QGIS API Documentation
3.26.3-Buenos Aires (65e4edfdad)
|
Go to the documentation of this file.
16 #ifndef QGSMULTIRENDERCHECKER_H
17 #define QGSMULTIRENDERCHECKER_H
19 #include "qgis_core.h"
72 void setControlName(
const QString &name );
74 void setControlPathPrefix(
const QString &prefix );
82 void setRenderedImage(
const QString &renderedImagePath ) { mRenderedImage = renderedImagePath; }
113 void setSizeTolerance(
int xTolerance,
int yTolerance ) { mMaxSizeDifferenceX = xTolerance; mMaxSizeDifferenceY = yTolerance; }
128 bool runTest(
const QString &testName,
unsigned int mismatchCount = 0 );
135 QString report()
const;
140 QString controlImagePath()
const;
149 bool mResult =
false;
151 QString mRenderedImage;
152 QString mControlName;
153 QString mControlPathPrefix;
154 unsigned int mColorTolerance = 0;
155 int mMaxSizeDifferenceX = 0;
156 int mMaxSizeDifferenceY = 0;
158 bool mExpectFail =
false;
160 bool mIsCiRun =
false;
181 QgsLayoutChecker(
const QString &testName,
QgsLayout *layout );
186 void setSize( QSize size ) { mSize = size; }
202 bool testLayout( QString &report,
int page = 0,
int pixelDiff = 0,
bool createReferenceImage =
false );
205 QgsLayoutChecker() =
delete;
217 #endif // QGSMULTIRENDERCHECKER_H
static void drawBackground(QImage *image)
Draws a checkboard pattern for image backgrounds, so that opacity is visible without requiring a tran...
void setColorTolerance(unsigned int colorTolerance)
Set tolerance for color components used by runTest() Default value is 0.
void setRenderedImage(const QString &renderedImagePath)
Set the path to the rendered image.
void setExpectFail(bool expectFail)
Sets whether the comparison is expected to fail.
static void drawBackground(QImage *image)
Draws a checkboard pattern for image backgrounds, so that opacity is visible without requiring a tran...
This class allows checking rendered images against comparison images.
#define SIP_IF_FEATURE(feature)
Base class for layouts, which can contain items such as maps, labels, scalebars, etc.
void setSizeTolerance(int xTolerance, int yTolerance)
Sets the largest allowable difference in size between the rendered and the expected image.
The QgsMapSettings class contains configuration for rendering of the map. The rendering itself is don...
#define SIP_FEATURE(feature)