Skip to content
Permalink
Browse files

Fix failing PyQgsBlendModes test

  • Loading branch information
nyalldawson committed Jul 1, 2015
1 parent d747a48 commit f72ae91480d97bdc0ff803a73782955134d80750
Showing with 6 additions and 3 deletions.
  1. +6 −3 tests/src/python/test_qgsblendmodes.py
@@ -35,6 +35,7 @@
QgsMultiRenderChecker,
QgsRasterLayer,
QgsMultiBandColorRenderer,
QgsRectangle
)

from utilities import (unitTestDataPath,
@@ -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."""

@@ -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)
@@ -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)
@@ -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 )

0 comments on commit f72ae91

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