内容表

上一话题

QAbstractTextDocumentLayout.PaintContext

下一话题

QAbstractOpenGLFunctions

QPainter.PixmapFragment

此类用于结合 drawPixmapFragments() function to specify how a pixmap, or sub-rect of a pixmap, is drawn. 更多

Inheritance diagram of PySide2.QtGui.QPainter.PixmapFragment

New in version 4.7.

概要

静态函数

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

详细描述

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)

参数

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 ] ] ] ] )
参数
  • 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 参数。