此類用於結閤 QPainter::drawPixmapFragments () 函數以指定如何繪製像素圖 (或像素圖子矩形)。 更多...
該類在 Qt 4.7 引入。
| qreal | height |
| qreal | opacity |
| qreal | rotation |
| qreal | scaleX |
| qreal | scaleY |
| qreal | sourceLeft |
| qreal | sourceTop |
| qreal | width |
| qreal | x |
| qreal | y |
| 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]
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 參數。
該函數在 Qt 4.7 引入。
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.