QSGSimpleRectNode Class
QSGSimpleRectNode クラスは、シーングラフを使用して塗りつぶされた長方形を描画するための便利クラスです。詳細...
| ヘッダー: | #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 シーングラフのデフォルトまたはソフトウェアバックエンドで実行した場合にのみ機能します。代替手段として、QQuickWindow::createRectangleNode() を通じてQSGRectangleNode を使用することを推奨します。ただし、このスタンドアロンクラスは、サブクラス化を通じて使用され、かつアプリケーション側で特別なシーングラフバックエンドが関与しないことが分かっている場合には、依然として有用です。
メンバ関数のドキュメント
QSGSimpleRectNode::QSGSimpleRectNode()
空の矩形と白色を持つ QSGSimpleRectNode インスタンスを作成します。
QSGSimpleRectNode::QSGSimpleRectNode(const QRectF &rect, const QColor &color)
rect にまたがり、色color を持つ 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 に設定します。
これはオーバーロードされた関数です。
© 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.