此类用于结合 QPainter::drawPixmapFragments () 函数以指定如何绘制像素图 (或像素图子矩形)。 更多...
qreal | height |
qreal | opacity |
qreal | rotation |
qreal | scaleX |
qreal | scaleY |
qreal | sourceLeft |
qreal | sourceTop |
qreal | width |
qreal | x |
qreal | y |
QPainter::PixmapFragment | create (const QPointF & pos , const QRectF & sourceRect , qreal scaleX = 1, qreal scaleY = 1, qreal rotation = 0, qreal opacity = 1) |
The sourceLeft , sourceTop , width and height 用作像素图源矩形的变量,会被传入 QPainter::drawPixmapFragments () 函数。变量 x , y , width and height 用于计算绘制的目标矩形。 x and y 表示目标矩形的中心。 width and height 是比例缩放目标矩形的 scaleX and scaleY 值。那么,结果目标矩形会旋转 rotation 度围绕 x , y 中心点。
另请参阅 QPainter::drawPixmapFragments ().
[static]
QPainter::PixmapFragment
PixmapFragment::
create
(const
QPointF
&
pos
, const
QRectF
&
sourceRect
,
qreal
scaleX
= 1,
qreal
scaleY
= 1,
qreal
rotation
= 0,
qreal
opacity
= 1)
此方便函数返回 QPainter::PixmapFragment 的初始化是采用 pos , sourceRect , scaleX , scaleY , rotation , opacity 参数。
This variable holds the height of the source rectangle and is used to calculate the height of the target rectangle.
This variable holds the opacity of the target rectangle, where 0.0 is fully transparent and 1.0 is fully opaque.
This variable holds the rotation of the target rectangle in degrees. The target rectangle is rotated after it has been scaled.
This variable holds the horizontal scale of the target rectangle.
This variable holds the vertical scale of the target rectangle.
This variable holds the left coordinate of the source rectangle.
This variable holds the top coordinate of the source rectangle.
This variable holds the width of the source rectangle and is used to calculate the width of the target rectangle.
This variable holds the x coordinate of center point in the target rectangle.
This variable holds the y coordinate of the center point in the target rectangle.