此类用于结合
drawPixmapFragments()function to specify how a pixmap, or sub-rect of a pixmap, is drawn. 更多 …
New in version 4.7.
sourceLeft,sourceTop,widthandheightvariables are used as a source rectangle within the pixmap passed into thedrawPixmapFragments()function. The variablesx,y,widthandheightare used to calculate the target rectangle that is drawn.xandydenotes the center of the target rectangle. Thewidthandheightin the target rectangle is scaled by thescaleXandscaleYvalues. The resulting target rectangle is then rotatedrotationdegrees around thex,ycenter point.
PySide2.QtGui.QPainter.
PixmapFragment
¶
PySide2.QtGui.QPainter.PixmapFragment(PixmapFragment)
PixmapFragment
–
PixmapFragment
PySide2.QtGui.QPainter.PixmapFragment.
x
¶
PySide2.QtGui.QPainter.PixmapFragment.
y
¶
PySide2.QtGui.QPainter.PixmapFragment.
sourceLeft
¶
PySide2.QtGui.QPainter.PixmapFragment.
sourceTop
¶
PySide2.QtGui.QPainter.PixmapFragment.
width
¶
PySide2.QtGui.QPainter.PixmapFragment.
height
¶
PySide2.QtGui.QPainter.PixmapFragment.
scaleX
¶
PySide2.QtGui.QPainter.PixmapFragment.
scaleY
¶
PySide2.QtGui.QPainter.PixmapFragment.
rotation
¶
PySide2.QtGui.QPainter.PixmapFragment.
opacity
¶
PySide2.QtGui.QPainter.PixmapFragment.
create
(
pos
,
sourceRect
[
,
scaleX=1
[
,
scaleY=1
[
,
rotation=0
[
,
opacity=1
]
]
]
]
)
¶
pos
–
QPointF
sourceRect
–
QRectF
scaleX
–
qreal
scaleY
–
qreal
rotation
–
qreal
opacity
–
qreal
PixmapFragment
This is a convenience function that returns a
PixmapFragment
that is initialized with the
pos
,
sourceRect
,
scaleX
,
scaleY
,
rotation
,
opacity
参数。