QPainter::PixmapFragment Class
class QPainter::PixmapFragmentこのクラスは、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) |
詳細な説明
sourceLeft 、sourceTop 、width 、およびheight 変数は、QPainter::drawPixmapFragments() 関数に渡されるピクマップ内のソース矩形として使用されます。x 、y 、width 、およびheight 変数は、描画されるターゲット矩形を計算するために使用されます。x およびy は、ターゲット矩形の中心を表します。ターゲット矩形内のwidth およびheight は、scaleX およびscaleY の値によってスケーリングされます。その結果得られたターゲット矩形は、x およびy の中心点を軸としてrotation 度回転されます。
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)
これは、pos 、sourceRect 、scaleX 、scaleY 、rotation 、opacity の各パラメータで初期化されたQPainter::PixmapFragment を返す便利関数です。
メンバー変数のドキュメント
qreal PixmapFragment::height
この変数には、ソース矩形の高さが格納されており、ターゲット矩形の高さを計算するために使用されます。
qreal PixmapFragment::opacity
この変数には、対象の矩形不透明度が格納されます。0.0は完全に透明、1.0は完全に不透明を表します。
qreal PixmapFragment::rotation
この変数には、ターゲット矩形の回転角度(度単位)が格納されます。ターゲット矩形は、拡大・縮小された後に回転されます。
qreal PixmapFragment::scaleX
この変数には、対象の矩形の水平スケールが格納されます。
qreal PixmapFragment::scaleY
この変数には、ターゲット矩形の垂直スケールが格納されます。
qreal PixmapFragment::sourceLeft
この変数には、ソース矩形の左座標が格納されます。
qreal PixmapFragment::sourceTop
この変数には、ソース矩形の上辺の座標が格納されます。
qreal PixmapFragment::width
この変数には、ソース矩形の幅が格納されており、ターゲット矩形の幅を計算するために使用されます。
qreal PixmapFragment::x
この変数には、対象の矩形の中心点の x 座標が格納されます。
qreal PixmapFragment::y
この変数には、対象の矩形の中心点のy座標が格納されます。
© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.