이 페이지에서

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()도 참조하십시오 .

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