def testRenderClosedRing(self): s = QgsLineSymbol() s.deleteSymbolLayer(0) raster_line = QgsRasterLineSymbolLayer() raster_line.setPath(TEST_DATA_DIR + '/raster_brush.png') raster_line.setWidth(8) s.appendSymbolLayer(raster_line.clone()) g = QgsGeometry.fromWkt('LineString(0 0, 10 0, 10 10, 0 10, 0 0)') rendered_image = self.renderGeometry(s, g) self.assertTrue( self.imageCheck('rasterline_closed', 'rasterline_closed', 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))