Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix failing PyQgsBlendModes test
  • Loading branch information
nyalldawson committed Jul 1, 2015
1 parent d747a48 commit f72ae91
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions tests/src/python/test_qgsblendmodes.py
Expand Up @@ -35,6 +35,7 @@
QgsMultiRenderChecker,
QgsRasterLayer,
QgsMultiBandColorRenderer,
QgsRectangle
)

from utilities import (unitTestDataPath,
Expand Down Expand Up @@ -95,6 +96,8 @@ def __init__(self, methodName):
self.mapSettings.setOutputSize(QSize(400, 400))
self.mapSettings.setOutputDpi( 96 )

self.extent = QgsRectangle( -118.8888888888887720, 22.8002070393376783, -83.3333333333331581, 46.8719806763287536 )

def testVectorBlending(self):
"""Test that blend modes work for vector layers."""

Expand All @@ -103,7 +106,7 @@ def testVectorBlending(self):
myLayers.append(self.mLineLayer.id())
myLayers.append(self.mPolygonLayer.id())
self.mapSettings.setLayers(myLayers)
self.mapSettings.setExtent(self.mPointLayer.extent())
self.mapSettings.setExtent(self.extent)

#Set blending modes for both layers
self.mLineLayer.setBlendMode(QPainter.CompositionMode_Difference)
Expand All @@ -130,7 +133,7 @@ def testVectorFeatureBlending(self):
myLayers.append(self.mLineLayer.id())
myLayers.append(self.mPolygonLayer.id())
self.mapSettings.setLayers(myLayers)
self.mapSettings.setExtent(self.mPointLayer.extent())
self.mapSettings.setExtent(self.extent)

#Set feature blending for line layer
self.mLineLayer.setFeatureBlendMode(QPainter.CompositionMode_Plus)
Expand All @@ -155,7 +158,7 @@ def testVectorLayerTransparency(self):
myLayers.append(self.mLineLayer.id())
myLayers.append(self.mPolygonLayer.id())
self.mapSettings.setLayers(myLayers)
self.mapSettings.setExtent(self.mPointLayer.extent())
self.mapSettings.setExtent(self.extent)

#Set feature blending for line layer
self.mLineLayer.setLayerTransparency( 50 )
Expand Down

0 comments on commit f72ae91

Please sign in to comment.