QGIS API Documentation
3.16.0-Hannover (43b64b13f3)
|
Go to the documentation of this file.
16 #ifndef QGSMULTIRENDERCHECKER_H
17 #define QGSMULTIRENDERCHECKER_H
19 #include "qgis_core.h"
71 void setControlName(
const QString &name );
73 void setControlPathPrefix(
const QString &prefix );
81 void setRenderedImage(
const QString &renderedImagePath ) { mRenderedImage = renderedImagePath; }
105 void setSizeTolerance(
int xTolerance,
int yTolerance ) { mMaxSizeDifferenceX = xTolerance; mMaxSizeDifferenceY = yTolerance; }
120 bool runTest(
const QString &testName,
unsigned int mismatchCount = 0 );
125 QString
report()
const {
return mReport; }
130 QString controlImagePath()
const;
140 QString mRenderedImage;
141 QString mControlName;
142 QString mControlPathPrefix;
143 unsigned int mColorTolerance = 0;
144 int mMaxSizeDifferenceX = 0;
145 int mMaxSizeDifferenceY = 0;
167 QgsLayoutChecker(
const QString &testName,
QgsLayout *layout );
172 void setSize( QSize size ) { mSize = size; }
188 bool testLayout( QString &report,
int page = 0,
int pixelDiff = 0,
bool createReferenceImage =
false );
191 QgsLayoutChecker() =
delete;
203 #endif // QGSMULTIRENDERCHECKER_H
virtual ~QgsMultiRenderChecker()=default
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.
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.
QString report() const
Returns a report for this test.
void setSizeTolerance(int xTolerance, int yTolerance)
Sets the largest allowable difference in size between the rendered and the expected image.
QgsMultiRenderChecker()=default
Constructor for QgsMultiRenderChecker.
The QgsMapSettings class contains configuration for rendering of the map.
#define SIP_FEATURE(feature)