mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-13 00:03:09 -04:00
avoid warning about not created test difference image
This commit is contained in:
parent
98c601d1ba
commit
d40d481bd3
@ -723,15 +723,15 @@ class QgsPalLabeling : QgsLabelingEngineInterface
|
||||
// void drawLabel( pal::LabelPosition* label, QgsRenderContext& context, QgsPalLayerSettings& tmpLyr, DrawLabelType drawType );
|
||||
|
||||
static void drawLabelBuffer( QgsRenderContext& context,
|
||||
const QgsLabelComponent& component,
|
||||
const QgsLabelComponent &component,
|
||||
const QgsPalLayerSettings& tmpLyr );
|
||||
|
||||
static void drawLabelBackground( QgsRenderContext& context,
|
||||
QgsLabelComponent component,
|
||||
const QgsPalLayerSettings& tmpLyr );
|
||||
|
||||
static void drawLabelShadow( QgsRenderContext& context,
|
||||
const QgsLabelComponent& component,
|
||||
static void drawLabelShadow( QgsRenderContext &context,
|
||||
const QgsLabelComponent &component,
|
||||
const QgsPalLayerSettings& tmpLyr );
|
||||
|
||||
//! load/save engine settings to project file
|
||||
@ -764,7 +764,7 @@ class QgsPalLabeling : QgsLabelingEngineInterface
|
||||
*/
|
||||
static bool geometryRequiresPreparation( const QgsGeometry *geometry, const QgsRenderContext &context, const QgsCoordinateTransform *ct, QgsGeometry *clipGeometry = 0 );
|
||||
|
||||
/** Splits a text string to a list of seperate lines, using a specified wrap character.
|
||||
/** Splits a text string to a list of separate lines, using a specified wrap character.
|
||||
* The text string will be split on either newline characters or the wrap character.
|
||||
* @param text text string to split
|
||||
* @param wrapCharacter additional character to wrap on
|
||||
|
@ -99,16 +99,16 @@ class CORE_EXPORT QgsPalLayerSettings
|
||||
|
||||
enum UpsideDownLabels
|
||||
{
|
||||
Upright, /*!< upside-down labels (90 <= angle < 270) are shown upright*/
|
||||
ShowDefined, /*!< show upside down when rotation is layer- or data-defined*/
|
||||
ShowAll /*!< show upside down for all labels, including dynamic ones*/
|
||||
Upright, /*!< upside-down labels (90 <= angle < 270) are shown upright */
|
||||
ShowDefined, /*!< show upside down when rotation is layer- or data-defined */
|
||||
ShowAll /*!< show upside down for all labels, including dynamic ones */
|
||||
};
|
||||
|
||||
enum DirectionSymbols
|
||||
{
|
||||
SymbolLeftRight, /*!< place direction symbols on left/right of label*/
|
||||
SymbolAbove, /*!< place direction symbols on above label*/
|
||||
SymbolBelow /*!< place direction symbols on below label*/
|
||||
SymbolLeftRight, /*!< place direction symbols on left/right of label */
|
||||
SymbolAbove, /*!< place direction symbols on above label */
|
||||
SymbolBelow /*!< place direction symbols on below label */
|
||||
};
|
||||
|
||||
enum MultiLineAlign
|
||||
|
@ -27,16 +27,16 @@
|
||||
#include <QDebug>
|
||||
#include <QBuffer>
|
||||
|
||||
QgsRenderChecker::QgsRenderChecker() :
|
||||
mReport( "" ),
|
||||
mMatchTarget( 0 ),
|
||||
mElapsedTime( 0 ),
|
||||
mRenderedImageFile( "" ),
|
||||
mExpectedImageFile( "" ),
|
||||
mMismatchCount( 0 ),
|
||||
mColorTolerance( 0 ),
|
||||
mElapsedTimeTarget( 0 ),
|
||||
mBufferDashMessages( false )
|
||||
QgsRenderChecker::QgsRenderChecker()
|
||||
: mReport( "" )
|
||||
, mMatchTarget( 0 )
|
||||
, mElapsedTime( 0 )
|
||||
, mRenderedImageFile( "" )
|
||||
, mExpectedImageFile( "" )
|
||||
, mMismatchCount( 0 )
|
||||
, mColorTolerance( 0 )
|
||||
, mElapsedTimeTarget( 0 )
|
||||
, mBufferDashMessages( false )
|
||||
{
|
||||
}
|
||||
|
||||
@ -359,7 +359,6 @@ bool QgsRenderChecker::compareImages( QString theTestName,
|
||||
//
|
||||
emitDashMessage( "Rendered Image " + theTestName + prefix, QgsDartMeasurement::ImagePng, mRenderedImageFile );
|
||||
emitDashMessage( "Expected Image " + theTestName + prefix, QgsDartMeasurement::ImagePng, mExpectedImageFile );
|
||||
emitDashMessage( "Difference Image " + theTestName + prefix, QgsDartMeasurement::ImagePng, myDiffImageFile );
|
||||
|
||||
//
|
||||
// Put the same info to debug too
|
||||
@ -430,6 +429,7 @@ bool QgsRenderChecker::compareImages( QString theTestName,
|
||||
//save the diff image to disk
|
||||
//
|
||||
myDifferenceImage.save( myDiffImageFile );
|
||||
emitDashMessage( "Difference Image " + theTestName + prefix, QgsDartMeasurement::ImagePng, myDiffImageFile );
|
||||
delete maskImage;
|
||||
|
||||
//
|
||||
|
@ -25,7 +25,7 @@ QgsComposerRuler::QgsComposerRuler( QgsComposerRuler::Direction d ) : QWidget( 0
|
||||
mRulerFont->setPointSize( RULER_FONT_SIZE );
|
||||
mRulerFontMetrics = new QFontMetrics( *mRulerFont );
|
||||
|
||||
//calculate ruler sizes and marker seperations
|
||||
//calculate ruler sizes and marker separations
|
||||
|
||||
//minimum gap required between major ticks is 3 digits * 250%, based on appearance
|
||||
mScaleMinPixelsWidth = mRulerFontMetrics->width( "000" ) * 2.5;
|
||||
@ -345,7 +345,7 @@ int QgsComposerRuler::optimumNumberDivisions( double rulerScale, int scaleMultip
|
||||
{
|
||||
//find pixel size for this small division
|
||||
double candidateSize = largeDivisionSize / ( *divisions_it );
|
||||
//check if this seperation is more then allowed min seperation
|
||||
//check if this separation is more then allowed min separation
|
||||
if ( candidateSize >= mMinPixelsPerDivision )
|
||||
{
|
||||
//found a good candidate, return it
|
||||
|
Loading…
x
Reference in New Issue
Block a user