Skip to content
Permalink
Browse files

Make paint effect test pass on OSX by explicitly setting dpi

  • Loading branch information
nyalldawson committed Jun 30, 2015
1 parent 5b97b7e commit 96b66ddf975c09efddd646a4ebfa5d8acd0da7d0
Showing with 11 additions and 0 deletions.
  1. +11 −0 tests/src/core/testqgspainteffect.cpp
@@ -328,7 +328,10 @@ void TestQgsPaintEffect::drawSource()

//test render
QImage image( 100, 100, QImage::Format_ARGB32 );
image.setDotsPerMeterX( 96 / 25.4 * 1000 );
image.setDotsPerMeterY( 96 / 25.4 * 1000 );
image.fill( Qt::transparent );

QPainter painter;
painter.begin( &image );
QgsRenderContext context = QgsSymbolLayerV2Utils::createRenderContext( &painter );
@@ -400,6 +403,8 @@ void TestQgsPaintEffect::blur()
delete effect;

QImage image( 100, 100, QImage::Format_ARGB32 );
image.setDotsPerMeterX( 96 / 25.4 * 1000 );
image.setDotsPerMeterY( 96 / 25.4 * 1000 );
image.fill( Qt::transparent );
QPainter painter;
painter.begin( &image );
@@ -496,6 +501,8 @@ void TestQgsPaintEffect::dropShadow()
delete effect;

QImage image( 100, 100, QImage::Format_ARGB32 );
image.setDotsPerMeterX( 96 / 25.4 * 1000 );
image.setDotsPerMeterY( 96 / 25.4 * 1000 );
image.fill( Qt::transparent );
QPainter painter;
painter.begin( &image );
@@ -597,6 +604,8 @@ void TestQgsPaintEffect::glow()
delete effect;

QImage image( 100, 100, QImage::Format_ARGB32 );
image.setDotsPerMeterX( 96 / 25.4 * 1000 );
image.setDotsPerMeterY( 96 / 25.4 * 1000 );
image.fill( Qt::transparent );
QPainter painter;
painter.begin( &image );
@@ -657,6 +666,8 @@ void TestQgsPaintEffect::stack()
//rendering

QImage image( 100, 100, QImage::Format_ARGB32 );
image.setDotsPerMeterX( 96 / 25.4 * 1000 );
image.setDotsPerMeterY( 96 / 25.4 * 1000 );
image.fill( Qt::transparent );
QPainter painter;
painter.begin( &image );

0 comments on commit 96b66dd

Please sign in to comment.
You can’t perform that action at this time.