Skip to content
Permalink
Browse files
avoid warning about not created test difference image
  • Loading branch information
jef-n committed May 25, 2015
1 parent 98c601d commit d40d481bd33db7fb3277a145eb36dda2fee47d3c
Showing with 23 additions and 23 deletions.
  1. +4 −4 python/core/qgspallabeling.sip
  2. +6 −6 src/core/qgspallabeling.h
  3. +11 −11 src/core/qgsrenderchecker.cpp
  4. +2 −2 src/gui/qgscomposerruler.cpp
@@ -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

0 comments on commit d40d481

Please sign in to comment.