The QSGOpacityNode class is used to change opacity of nodes. 更多...
| 頭: | #include <QSGOpacityNode> |
| qmake: | QT += quick |
| 繼承: | QSGNode |
| QSGOpacityNode () | |
| virtual | ~QSGOpacityNode () override |
| qreal | opacity () const |
| void | setOpacity (qreal opacity ) |
The QSGOpacityNode class is used to change opacity of nodes.
Opacity applies to its subtree and can be nested. Multiple opacity nodes will be accumulated by multiplying their opacity. The accumulation happens as part of the rendering.
When nested opacity gets below a certain threshold, the subtree might be marked as blocked, causing isSubtreeBlocked () to return true. This is done for performance reasons.
注意: 所有帶有 QSG 前綴的類隻應用於場景圖形渲染綫程。見 場景圖形和渲染 瞭解更多信息。
Constructs an opacity node with a default opacity of 1.
Opacity accumulates downwards in the scene graph so a node with two QSGOpacityNode instances above it, both with opacity of 0.5, will have effective opacity of 0.25.
節點的默認不透明度為 1。
[override virtual]
QSGOpacityNode::
~QSGOpacityNode
()
刪除不透明度節點。
返迴此不透明度節點的不透明度。
另請參閱 setOpacity ().
Sets the opacity of this node to opacity .
Before rendering the graph, the renderer will do an update pass over the subtree to propagate the opacity to its children.
The value will be bounded to the range 0 to 1.
另請參閱 opacity ().