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


Python QPainterPath.arcMoveTo方法代码示例

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


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

示例1: updatePath

# 需要导入模块: from PySide.QtGui import QPainterPath [as 别名]
# 或者: from PySide.QtGui.QPainterPath import arcMoveTo [as 别名]
 def updatePath(self):
     """
     TOWRITE
     """
     path = QPainterPath()
     r = self.rect()  # QRectF
     path.arcMoveTo(r, 0)
     path.arcTo(r, 0, 360)
     # NOTE: Reverse the path so that the inside area isn't considered part of the ellipse
     path.arcTo(r, 0, -360)
     self.setObjectPath(path)
开发者ID:Allen76,项目名称:Embroidermodder,代码行数:13,代码来源:object_ellipse.py

示例2: updatePath

# 需要导入模块: from PySide.QtGui import QPainterPath [as 别名]
# 或者: from PySide.QtGui.QPainterPath import arcMoveTo [as 别名]
 def updatePath(self):
     """
     TOWRITE
     """
     path = QPainterPath()
     r = self.rect()  # QRectF
     # Add the center point.
     path.addRect(-0.00000001, -0.00000001, 0.00000002, 0.00000002)
     # Add the circle.
     path.arcMoveTo(r, 0)
     path.arcTo(r, 0, 360)
     # NOTE: Reverse the path so that the inside area isn't considered part of the circle.
     path.arcTo(r, 0, -360)
     self.setObjectPath(path)
开发者ID:Metallicow,项目名称:Embroidermodder,代码行数:16,代码来源:object_circle.py

示例3: set_shape

# 需要导入模块: from PySide.QtGui import QPainterPath [as 别名]
# 或者: from PySide.QtGui.QPainterPath import arcMoveTo [as 别名]
 def set_shape(self, width, height):
     ''' ANSWER has round, disjoint sides - does not fit in a polygon '''
     self.width, self.height = width, height
     point = 20 #width / 2.85
     path = QPainterPath()
     left = QRect(0, 0, point, height)
     right = QRect(width - point, 0, point, height)
     path.arcMoveTo(left, 125)
     path.arcTo(left, 125, 110)
     path.arcMoveTo(right, -55)
     path.arcTo(right, -55, 110)
     path.moveTo(width, height)
     self.setPath(path)
     super(DecisionAnswer, self).set_shape(width, height)
开发者ID:Kampbell,项目名称:opengeode,代码行数:16,代码来源:sdlSymbols.py

示例4: objectSavePath

# 需要导入模块: from PySide.QtGui import QPainterPath [as 别名]
# 或者: from PySide.QtGui.QPainterPath import arcMoveTo [as 别名]
    def objectSavePath(self):
        """
        TOWRITE

        :rtype: `QPainterPath`_
        """
        path = QPainterPath()
        r = self.rect()  # QRectF
        path.arcMoveTo(r, 0)
        path.arcTo(r, 0, 360)

        s = self.scale()  # qreal
        trans = QTransform()
        trans.rotate(self.rotation())
        trans.scale(s, s)
        return trans.map(path)
开发者ID:Allen76,项目名称:Embroidermodder,代码行数:18,代码来源:object_ellipse.py

示例5: updatePath

# 需要导入模块: from PySide.QtGui import QPainterPath [as 别名]
# 或者: from PySide.QtGui.QPainterPath import arcMoveTo [as 别名]
    def updatePath(self):
        """
        TOWRITE
        """
        startAngle = (self.objectStartAngle() + self.rotation())  # qreal
        spanAngle = self.objectIncludedAngle()                    # qreal

        if self.objectClockwise():
            spanAngle = -spanAngle

        path = QPainterPath()
        path.arcMoveTo(self.rect(), startAngle)
        path.arcTo(self.rect(), startAngle, spanAngle)
        # NOTE: Reverse the path so that the inside area isn't considered part of the arc
        path.arcTo(self.rect(), startAngle + spanAngle, -spanAngle);
        self.setObjectPath(path)
开发者ID:Drahflow,项目名称:Embroidermodder,代码行数:18,代码来源:object_arc.py


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