QSGOpacityNode Class
QSGOpacityNode 클래스는 노드의 불투명도를 변경하는 데 사용됩니다. 더 보기...
헤더: | #include <QSGOpacityNode> |
CMake: | find_package(Qt6 REQUIRED COMPONENTS Quick) target_link_libraries(mytarget PRIVATE Qt6::Quick) |
qmake: | QT += quick |
상속합니다: | QSGNode |
- 상속된 멤버를 포함한 모든 멤버 목록
- QSGOpacityNode는 Qt Quick 씬 그래프 노드 클래스의 일부입니다.
공용 함수
QSGOpacityNode() | |
virtual | ~QSGOpacityNode() override |
qreal | opacity() const |
void | setOpacity(qreal opacity) |
상세 설명
불투명도는 하위 트리에 적용되며 중첩될 수 있습니다. 여러 개의 불투명도 노드는 불투명도를 곱하여 누적됩니다. 누적은 렌더링의 일부로 발생합니다.
중첩된 불투명도가 특정 임계값 미만이 되면 하위 트리가 차단된 것으로 표시되어 isSubtreeBlocked()가 참으로 반환될 수 있습니다. 이는 성능상의 이유로 수행됩니다.
참고: 접두사가 QSG인 모든 클래스는 씬 그래프의 렌더링 스레드에서만 사용해야 합니다. 자세한 내용은 씬 그래프 및 렌더링을 참조하십시오.
멤버 함수 문서
QSGOpacityNode::QSGOpacityNode()
기본 불투명도가 1인 불투명도 노드를 생성합니다.
불투명도는 씬 그래프에서 아래쪽으로 누적되므로 그 위에 불투명도가 0.5인 두 개의 QSGOpacityNode 인스턴스가 있는 노드는 유효 불투명도가 0.25가 됩니다.
노드의 기본 불투명도는 1입니다.
[override virtual noexcept]
QSGOpacityNode::~QSGOpacityNode()
불투명도 노드를 삭제합니다.
qreal QSGOpacityNode::opacity() const
이 불투명도 노드의 불투명도를 반환합니다.
setOpacity()도 참조하세요 .
void QSGOpacityNode::setOpacity(qreal opacity)
이 노드의 불투명도를 opacity 로 설정합니다.
그래프를 렌더링하기 전에 렌더러는 서브트리에 대한 업데이트 패스를 수행하여 불투명도를 자식에게 전파합니다.
이 값은 0에서 1 범위로 제한됩니다.
opacity()도 참조하세요 .
© 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.