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


Python QFont.setPointSizeF方法代码示例

本文整理汇总了Python中qgis.PyQt.QtGui.QFont.setPointSizeF方法的典型用法代码示例。如果您正苦于以下问题:Python QFont.setPointSizeF方法的具体用法?Python QFont.setPointSizeF怎么用?Python QFont.setPointSizeF使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在qgis.PyQt.QtGui.QFont的用法示例。


在下文中一共展示了QFont.setPointSizeF方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: test_word_spacing

# 需要导入模块: from qgis.PyQt.QtGui import QFont [as 别名]
# 或者: from qgis.PyQt.QtGui.QFont import setPointSizeF [as 别名]
 def test_word_spacing(self):
     # Modified word spacing
     font = QFont(self._TestFont)
     font.setPointSizeF(30)
     font.setWordSpacing(20.5)
     self.lyr.textFont = font
     self.checkTest()
开发者ID:Cracert,项目名称:Quantum-GIS,代码行数:9,代码来源:test_qgspallabeling_tests.py

示例2: test_letter_spacing

# 需要导入模块: from qgis.PyQt.QtGui import QFont [as 别名]
# 或者: from qgis.PyQt.QtGui.QFont import setPointSizeF [as 别名]
 def test_letter_spacing(self):
     # Modified letter spacing
     font = QFont(self._TestFont)
     font.setLetterSpacing(QFont.AbsoluteSpacing, 3.5)
     font.setPointSizeF(30)
     self.lyr.textFont = font
     self.checkTest()
开发者ID:Cracert,项目名称:Quantum-GIS,代码行数:9,代码来源:test_qgspallabeling_tests.py

示例3: test_text_size_map_unit

# 需要导入模块: from qgis.PyQt.QtGui import QFont [as 别名]
# 或者: from qgis.PyQt.QtGui.QFont import setPointSizeF [as 别名]
 def test_text_size_map_unit(self):
     # Label text size in map units
     self.lyr.fontSizeInMapUnits = True
     font = QFont(self._TestFont)
     font.setPointSizeF(460)
     self.lyr.textFont = font
     self._Mismatches['TestCanvasPoint'] = 776
     self._ColorTols['TestComposerPdfPoint'] = 2
     self.checkTest()
开发者ID:AM7000000,项目名称:QGIS,代码行数:11,代码来源:test_qgspallabeling_tests.py

示例4: test_partials_labels_disabled

# 需要导入模块: from qgis.PyQt.QtGui import QFont [as 别名]
# 或者: from qgis.PyQt.QtGui.QFont import setPointSizeF [as 别名]
 def test_partials_labels_disabled(self):
     # Set Big font size
     font = QFont(self._TestFont)
     font.setPointSizeF(84)
     self.lyr.textFont = font
     # Disable partials labels
     self._Pal.setShowingPartialsLabels(False)
     self._Pal.saveEngineSettings()
     self.checkTest()
开发者ID:AM7000000,项目名称:QGIS,代码行数:11,代码来源:test_qgspallabeling_tests.py

示例5: test_partials_labels_enabled

# 需要导入模块: from qgis.PyQt.QtGui import QFont [as 别名]
# 或者: from qgis.PyQt.QtGui.QFont import setPointSizeF [as 别名]
 def test_partials_labels_enabled(self):
     # Set Big font size
     font = QFont(self._TestFont)
     font.setPointSizeF(84)
     self.lyr.textFont = font
     # Enable partials labels
     self._Pal.setShowingPartialsLabels(True)
     self._Pal.saveEngineSettings()
     self._Mismatches['TestCanvasPoint'] = 779
     self._ColorTols['TestComposerPdfPoint'] = 2
     self.checkTest()
开发者ID:AM7000000,项目名称:QGIS,代码行数:13,代码来源:test_qgspallabeling_tests.py

示例6: test_background_svg

# 需要导入模块: from qgis.PyQt.QtGui import QFont [as 别名]
# 或者: from qgis.PyQt.QtGui.QFont import setPointSizeF [as 别名]
    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._Mismatches["TestCanvasPoint"] = 776
        self._ColorTols["TestComposerPdfPoint"] = 2
        self.checkTest()
开发者ID:Cracert,项目名称:Quantum-GIS,代码行数:20,代码来源:test_qgspallabeling_tests.py

示例7: test_background_rect_w_offset

# 需要导入模块: from qgis.PyQt.QtGui import QFont [as 别名]
# 或者: from qgis.PyQt.QtGui.QFont import setPointSizeF [as 别名]
    def test_background_rect_w_offset(self):
        # Label rectangular background
        self._Mismatches['TestComposerImageVsCanvasPoint'] = 800
        self._Mismatches['TestComposerImagePoint'] = 800
        # verify fix for issues
        #   http://hub.qgis.org/issues/9057
        #   http://gis.stackexchange.com/questions/86900
        self.lyr.fontSizeInMapUnits = True
        font = QFont(self._TestFont)
        font.setPointSizeF(460)
        self.lyr.textFont = font

        self.lyr.shapeDraw = True
        self.lyr.shapeOffsetUnits = QgsPalLayerSettings.MapUnits
        self.lyr.shapeOffset = QPointF(-2900.0, -450.0)

        self._Mismatches['TestCanvasPoint'] = 774
        self._ColorTols['TestComposerPdfPoint'] = 2
        self.checkTest()
开发者ID:AM7000000,项目名称:QGIS,代码行数:21,代码来源:test_qgspallabeling_tests.py


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