本文整理汇总了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)
示例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)
示例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)
示例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)
示例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)