QSGFlatColorMaterial Class

QSGFlatColorMaterial クラスは、シーングラフでソリッドカラーのジオメトリをレンダリングする便利な方法を提供します。詳細...

ヘッダー #include <QSGFlatColorMaterial>
CMake: find_package(Qt6 REQUIRED COMPONENTS Quick)
target_link_libraries(mytarget PRIVATE Qt6::Quick)
qmake: QT += quick
継承: QSGMaterial

パブリック関数

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()も参照してください

© 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.