QSGSimpleRectNode Class
QSGSimpleRectNodeクラスは、scenegraphを使用してソリッドで塗りつぶされた矩形を描画するための便利なクラスです。さらに...
ヘッダー | #include <QSGSimpleRectNode> |
CMake: | find_package(Qt6 REQUIRED COMPONENTS Quick) target_link_libraries(mytarget PRIVATE Qt6::Quick) |
qmake: | QT += quick |
継承: | QSGGeometryNode |
パブリック関数
QSGSimpleRectNode() | |
QSGSimpleRectNode(const QRectF &rect, const QColor &color) | |
QColor | color() const |
QRectF | rect() const |
void | setColor(const QColor &color) |
void | setRect(const QRectF &rect) |
void | setRect(qreal x, qreal y, qreal w, qreal h) |
詳しい説明
警告 このユーティリティクラスは、Qt Quick scenegraphのデフォルトまたはソフトウェアバックエンドで動作しているときのみ機能します。別の方法として、QQuickWindow::createRectangleNode() を介してQSGRectangleNode を使用することをお勧めします。しかし、このスタンドアロン・クラスは、サブクラス化によって使用され、アプリケーションが特別なシーングラフ・バックエンドが関与しないことを知っている場合、まだ有用です。
メンバー関数ドキュメント
QSGSimpleRectNode::QSGSimpleRectNode()
空の矩形と白色で QSGSimpleRectNode インスタンスを構築します。
QSGSimpleRectNode::QSGSimpleRectNode(const QRectF &rect, const QColor &color)
色color を持つスパンrect である QSGSimpleRectNode インスタンスを構築します。
QColor QSGSimpleRectNode::color() const
この矩形の色を返します。
setColor()も参照 。
QRectF QSGSimpleRectNode::rect() const
この rect ノードがカバーする矩形を返します。
setRect()も参照してください 。
void QSGSimpleRectNode::setColor(const QColor &color)
この矩形の色をcolor に設定します。 デフォルトの色は白です。
color()も参照してください 。
void QSGSimpleRectNode::setRect(const QRectF &rect)
この rect ノードの矩形をrect に設定します。
rect()も参照 。
void QSGSimpleRectNode::setRect(qreal x, qreal y, qreal w, qreal h)
これはオーバーロードされた関数です。
この rect ノードの矩形を、 (x,y) を始点とし、幅w と高さh を持つように設定します。
© 2025 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.