Skip to content
Permalink
Browse files
Renderer tests passing now
  • Loading branch information
timlinux committed Apr 8, 2012
1 parent 712cab9 commit bbf471eee70f5bf24c581e9c97422843a04e878c
@@ -63,7 +63,7 @@ bool QgsRenderChecker::runTest( QString theTestName,
mpMapRenderer->setOutputSize( QSize(
myExpectedImage.width(),
myExpectedImage.height() ),
myExpectedImage.logicalDpiX() );
myExpectedImage.logicalDpiX());
QTime myTime;
myTime.start();
mpMapRenderer->render( &myPainter );
@@ -73,8 +73,9 @@ bool QgsRenderChecker::runTest( QString theTestName,
// Save the pixmap to disk so the user can make a
// visual assessment if needed
//
mRenderedImageFile = QDir::tempPath() + QDir::separator() + theTestName + "_result.png";
myImage.save( mRenderedImageFile );
mRenderedImageFile = QDir::tempPath() + QDir::separator() +
theTestName + "_result.png";
myImage.save( mRenderedImageFile, "PNG", 100 );
return compareImages( theTestName, theMismatchCount );

}
@@ -106,8 +107,11 @@ bool QgsRenderChecker::compareImages( QString theTestName,
//
QImage myExpectedImage( mExpectedImageFile );
QImage myResultImage( mRenderedImageFile );
QImage myDifferenceImage( myExpectedImage.width(), myExpectedImage.height(), QImage::Format_RGB32 );
QString myResultDiffImage = QDir::tempPath() + QDir::separator() + theTestName + "_result_diff.png";
QImage myDifferenceImage( myExpectedImage.width(),
myExpectedImage.height(),
QImage::Format_RGB32 );
QString myResultDiffImage = QDir::tempPath() + QDir::separator() +
theTestName + "_result_diff.png";
myDifferenceImage.fill( qRgb( 152, 219, 249 ) );

//
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 comments on commit bbf471e

Please sign in to comment.