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

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.PixmapFragment

PySide2.QtGui.PixmapFragment(PixmapFragment)

Parameters

PixmapFragmentPySide2.QtGui.PixmapFragment

PySide2.QtGui.PixmapFragment.x
PySide2.QtGui.PixmapFragment.y
PySide2.QtGui.PixmapFragment.sourceLeft
PySide2.QtGui.PixmapFragment.sourceTop
PySide2.QtGui.PixmapFragment.width
PySide2.QtGui.PixmapFragment.height
PySide2.QtGui.PixmapFragment.scaleX
PySide2.QtGui.PixmapFragment.scaleY
PySide2.QtGui.PixmapFragment.rotation
PySide2.QtGui.PixmapFragment.opacity
static PySide2.QtGui.PixmapFragment.create(pos, sourceRect[, scaleX=1[, scaleY=1[, rotation=0[, opacity=1]]]])
Parameters
Return type

PySide2.QtGui.PixmapFragment

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