Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Make paint effect test pass on OSX by explicitly setting dpi
  • Loading branch information
nyalldawson committed Jun 30, 2015
1 parent 5b97b7e commit 96b66dd
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tests/src/core/testqgspainteffect.cpp
Expand Up @@ -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 );
Expand Down Expand Up @@ -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 );
Expand Down Expand Up @@ -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 );
Expand Down Expand Up @@ -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 );
Expand Down Expand Up @@ -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 );
Expand Down

0 comments on commit 96b66dd

Please sign in to comment.