def testLineOffset(self): s = QgsLineSymbol() s.deleteSymbolLayer(0) raster_line = QgsRasterLineSymbolLayer() raster_line.setPath(TEST_DATA_DIR + '/raster_brush.png') raster_line.setWidth(5) raster_line.setOffset(5) s.appendSymbolLayer(raster_line.clone()) g = QgsGeometry.fromWkt('LineString(2 2, 10 10, 10 0)') rendered_image = self.renderGeometry(s, g) self.assertTrue( self.imageCheck('rasterline_offset', 'rasterline_offset', rendered_image))
def testRenderBevelJoin(self): s = QgsLineSymbol() s.deleteSymbolLayer(0) raster_line = QgsRasterLineSymbolLayer() raster_line.setPath(TEST_DATA_DIR + '/raster_brush.png') raster_line.setWidth(15) raster_line.setPenJoinStyle(Qt.BevelJoin) s.appendSymbolLayer(raster_line.clone()) g = QgsGeometry.fromWkt('LineString(2 2, 10 10, 10 0)') rendered_image = self.renderGeometry(s, g) self.assertTrue( self.imageCheck('rasterline_beveljoin', 'rasterline_beveljoin', rendered_image))