QPainter.PixmapFragment¶
This class is used in conjunction with the
drawPixmapFragments()
function to specify how a pixmap, or sub-rect of a pixmap, is drawn. More…

New in version 4.7.
Synopsis¶
Detailed Description¶
The
sourceLeft
,sourceTop
,width
andheight
variables are used as a source rectangle within the pixmap passed into thedrawPixmapFragments()
function. The variablesx
,y
,width
andheight
are used to calculate the target rectangle that is drawn.x
andy
denotes the center of the target rectangle. Thewidth
andheight
in the target rectangle is scaled by thescaleX
andscaleY
values. The resulting target rectangle is then rotatedrotation
degrees around thex
,y
center point.See also
-
class
PySide2.QtGui.QPainter.
PixmapFragment
¶ PySide2.QtGui.QPainter.PixmapFragment(PixmapFragment)
- Parameters
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
¶
-
static
PySide2.QtGui.QPainter.PixmapFragment.
create
(pos, sourceRect[, scaleX=1[, scaleY=1[, rotation=0[, opacity=1]]]])¶ - Parameters
pos –
QPointF
sourceRect –
QRectF
scaleX –
qreal
scaleY –
qreal
rotation –
qreal
opacity –
qreal
- Return type
PixmapFragment
This is a convenience function that returns a
PixmapFragment
that is initialized with thepos
,sourceRect
,scaleX
,scaleY
,rotation
,opacity
parameters.