이 페이지에서

QSGOpacityNode Class

QSGOpacityNode 클래스는 노드의 불투명도를 변경하는 데 사용됩니다. 더 보기...

헤더: #include <QSGOpacityNode>
CMake: find_package(Qt6 REQUIRED COMPONENTS Quick)
target_link_libraries(mytarget PRIVATE Qt6::Quick)
qmake: QT += quick
상속받는 항목: QSGNode

공개 함수

QSGOpacityNode()
virtual ~QSGOpacityNode() override
qreal opacity() const
void setOpacity(qreal opacity)

상세 설명

불투명도(Opacity)는 하위 트리에 적용되며 중첩될 수 있습니다. 여러 불투명도 노드는 각 노드의 불투명도를 곱하여 누적됩니다. 이 누적 과정은 렌더링의 일부로 수행됩니다.

중첩된 불투명도가 특정 임계값 아래로 떨어지면, 하위 트리가 차단된 것으로 표시되어 isSubtreeBlocked()가 true를 반환할 수 있습니다. 이는 성능상의 이유로 수행됩니다.

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

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