当前位置: 首页>>代码示例>>Python>>正文


Python utilities.svgSymbolsPath函数代码示例

本文整理汇总了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()
开发者ID:lyhkop,项目名称:QGIS,代码行数:25,代码来源:test_qgspallabeling_tests.py

示例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()
开发者ID:Waferix,项目名称:QGIS,代码行数:16,代码来源:test_qgspallabeling_tests.py

示例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()
开发者ID:glubbered,项目名称:QGIS,代码行数:19,代码来源:test_qgspallabeling_tests.py


注:本文中的utilities.svgSymbolsPath函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。