本文整理汇总了Python中utilities.svgSymbolsPath函数的典型用法代码示例。如果您正苦于以下问题:Python svgSymbolsPath函数的具体用法?Python svgSymbolsPath怎么用?Python svgSymbolsPath使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了svgSymbolsPath函数的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_background_svg_w_offset
def test_background_svg_w_offset(self):
# Label SVG background
format = self.lyr.format()
format.setSizeUnit(QgsUnitTypes.RenderMapUnits)
format.setSize(460)
font = QFont(self._TestFont)
format.setFont(font)
format.background().setEnabled(True)
format.background().setType(QgsTextBackgroundSettings.ShapeSVG)
svg = os.path.join(
svgSymbolsPath(), 'backgrounds', 'background_square.svg')
format.background().setSvgFile(svg)
format.background().setSizeUnit(QgsUnitTypes.RenderMapUnits)
format.background().setSizeType(QgsTextBackgroundSettings.SizeBuffer)
format.background().setSize(QSizeF(100.0, 0.0))
format.background().setOffsetUnit(QgsUnitTypes.RenderMapUnits)
format.background().setOffset(QPointF(-2850.0, 500.0))
self.lyr.setFormat(format)
self._Mismatches['TestComposerPdfVsComposerPoint'] = 760
self._Mismatches['TestCanvasPoint'] = 776
self._ColorTols['TestComposerPdfPoint'] = 2
self.checkTest()
示例2: test_background_svg
def test_background_svg(self):
# Label SVG background
self.lyr.fontSizeInMapUnits = True
font = QFont(self._TestFont)
font.setPointSizeF(460)
self.lyr.textFont = font
self.lyr.shapeDraw = True
self.lyr.shapeType = QgsPalLayerSettings.ShapeSVG
svg = os.path.join(svgSymbolsPath(), "backgrounds", "background_square.svg")
self.lyr.shapeSVGFile = svg
self.lyr.shapeSizeUnits = QgsPalLayerSettings.MapUnits
self.lyr.shapeSizeType = QgsPalLayerSettings.SizeBuffer
self.lyr.shapeSize = QPointF(100.0, 0.0)
self._Mismatches["TestComposerPdfVsComposerPoint"] = 580
self.checkTest()
示例3: test_background_svg_w_offset
def test_background_svg_w_offset(self):
# Label SVG background
self.lyr.fontSizeInMapUnits = True
font = QFont(self._TestFont)
font.setPointSizeF(460)
self.lyr.textFont = font
self.lyr.shapeDraw = True
self.lyr.shapeType = QgsPalLayerSettings.ShapeSVG
svg = os.path.join(
svgSymbolsPath(), 'backgrounds', 'background_square.svg')
self.lyr.shapeSVGFile = svg
self.lyr.shapeSizeUnits = QgsPalLayerSettings.MapUnits
self.lyr.shapeSizeType = QgsPalLayerSettings.SizeBuffer
self.lyr.shapeSize = QPointF(100.0, 0.0)
self.lyr.shapeOffsetUnits = QgsPalLayerSettings.MapUnits
self.lyr.shapeOffset = QPointF(-2850.0, 500.0)
self.checkTest()