QSGFlatColorMaterial Class
QSGFlatColorMaterial クラスは、シーングラフ内で単色のジオメトリをレンダリングするための便利な方法を提供します。詳細...
| ヘッダー: | #include <QSGFlatColorMaterial> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS Quick) target_link_libraries(mytarget PRIVATE Qt6::Quick) |
| qmake: | QT += quick |
| 継承元: | QSGMaterial |
- 継承されたメンバーを含むすべてのメンバーの一覧
- QSGFlatColorMaterialは、Qt Quick のシーングラフマテリアルクラスの一部です。
パブリック関数
| QSGFlatColorMaterial() | |
| const QColor & | color() const |
| void | setColor(const QColor &color) |
詳細な説明
警告: この ユーティリティクラスは、Qt Quick シーングラフのデフォルトバックエンドで実行している場合にのみ機能します。
フラットカラーマテリアルは、ジオメトリのすべてのピクセルを単色で塗りつぶします。色には透明度を含めることができます。
フラットカラーマテリアルでレンダリングされるジオメトリは、正しくレンダリングされるために、QSGGeometry オブジェクトの属性位置 0 に頂点が必要です。QSGGeometry::defaultAttributes_Point2D() は、このマテリアルと互換性のある属性セットを返します。
フラットカラーマテリアルは、レンダリング状態を更新する際、現在の不透明度と現在のマトリックスの両方を反映します。
メンバ関数のドキュメント
QSGFlatColorMaterial::QSGFlatColorMaterial()
新しいフラットカラーのマテリアルを作成します。
デフォルトの色は白です。
const QColor &QSGFlatColorMaterial::color() const
このフラットカラーマテリアルの色を返します。
デフォルトの色は白です。
setColor()も参照してください 。
void QSGFlatColorMaterial::setColor(const QColor &color)
このフラットカラーマテリアルの色を `color` に設定します。
color()も参照してください 。
© 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.