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鈥�

Inheritance diagram of PySide2.QtGui.QPainter.PixmapFragment

New in version 4.7.

Synopsis露

Static functions露

  • def create (pos, sourceRect[, scaleX=1[, scaleY=1[, rotation=0[, opacity=1]]]])

Detailed Description露

The sourceLeft , sourceTop , width and height variables are used as a source rectangle within the pixmap passed into the drawPixmapFragments() function. The variables x , y , width and height are used to calculate the target rectangle that is drawn. x and y denotes the center of the target rectangle. The width and height in the target rectangle is scaled by the scaleX and scaleY values. The resulting target rectangle is then rotated rotation degrees around the x , y center point.

class PySide2.QtGui.QPainter.PixmapFragment露

PySide2.QtGui.QPainter.PixmapFragment(PixmapFragment)

Parameters:

PixmapFragment 鈥� PySide2.QtGui.QPainter.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:
Return type:

PySide2.QtGui.QPainter.PixmapFragment

This is a convenience function that returns a PixmapFragment that is initialized with the pos , sourceRect , scaleX , scaleY , rotation , opacity parameters.