PySide6.QtGui.QPainter.PixmapFragment¶
- class 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…Added in version 4.7.
Synopsis¶
Static functions¶
def
create()
Note
This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE
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
- PySide6.QtGui.QPainter.PixmapFragment.x¶
- PySide6.QtGui.QPainter.PixmapFragment.y¶
- PySide6.QtGui.QPainter.PixmapFragment.sourceLeft¶
- PySide6.QtGui.QPainter.PixmapFragment.sourceTop¶
- PySide6.QtGui.QPainter.PixmapFragment.width¶
- PySide6.QtGui.QPainter.PixmapFragment.height¶
- PySide6.QtGui.QPainter.PixmapFragment.scaleX¶
- PySide6.QtGui.QPainter.PixmapFragment.scaleY¶
- PySide6.QtGui.QPainter.PixmapFragment.rotation¶
- PySide6.QtGui.QPainter.PixmapFragment.opacity¶
- static create(pos, sourceRect[, scaleX=1[, scaleY=1[, rotation=0[, opacity=1]]]])¶
This is a convenience function that returns a
PixmapFragment
that is initialized with thepos
,sourceRect
,scaleX
,scaleY
,rotation
,opacity
parameters.