The QSGClipNode class implements the clipping functionality in the scene graph. 更多...
| 頭: | #include <QSGClipNode> |
| qmake: | QT += quick |
| 繼承: | QSGBasicGeometryNode |
| QSGClipNode () | |
| ~QSGClipNode () | |
| QRectF | clipRect () const |
| bool | isRectangular () const |
| void | setClipRect (const QRectF & rect ) |
| void | setIsRectangular (bool rectHint ) |
The QSGClipNode class implements the clipping functionality in the scene graph.
Clipping applies to the node's subtree and can be nested. Multiple clip nodes will be accumulated by intersecting all their geometries. The accumulation happens as part of the rendering.
Clip nodes must have a geometry before they can be added to the scene graph.
Clipping is usually implemented by using the stencil buffer.
注意: 所有帶有 QSG 前綴的類隻應用於場景圖形渲染綫程。見 場景圖形和渲染 瞭解更多信息。
創建新的 QSGClipNode without a geometry.
The clip node must have a geometry before it can be added to the scene graph.
Deletes this QSGClipNode .
If the flag QSGNode::OwnsGeometry is set, the geometry will also be deleted.
Returns the clip rect of this node.
另請參閱 setClipRect ().
Returns if this clip node has a rectangular clip.
另請參閱 setIsRectangular ().
Sets the clip rect of this clip node to rect .
When a rectangular clip is set in combination with setIsRectangular the renderer may in some cases use a more optimal clip method.
另請參閱 clipRect ().
Sets whether this clip node has a rectangular clip to rectHint .
This is an optimization hint which means that the renderer can use scissoring instead of stencil, which is significantly faster.
When this hint is set and it is applicable, the clip region will be generated from clipRect () 而不是 geometry ().
默認情況下此特性為
false
.
另請參閱 isRectangular ().