QSGClipNode¶
The
QSGClipNode
class implements the clipping functionality in the scene graph. More…
Synopsis¶
Functions¶
def
clipRect
()def
isRectangular
()def
setClipRect
(arg__1)def
setIsRectangular
(rectHint)
Detailed Description¶
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.
Note
All classes with QSG prefix should be used solely on the scene graph’s rendering thread. See Scene Graph and Rendering for more information.
- class PySide2.QtQuick.QSGClipNode¶
Creates a new
QSGClipNode
without a geometry.The clip node must have a geometry before it can be added to the scene graph.
- PySide2.QtQuick.QSGClipNode.clipRect()¶
- Return type:
Returns the clip rect of this node.
See also
- PySide2.QtQuick.QSGClipNode.isRectangular()¶
- Return type:
bool
Returns if this clip node has a rectangular clip.
See also
- PySide2.QtQuick.QSGClipNode.setClipRect(arg__1)¶
- Parameters:
arg__1 –
PySide2.QtCore.QRectF
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.See also
- PySide2.QtQuick.QSGClipNode.setIsRectangular(rectHint)¶
- Parameters:
rectHint – bool
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()
rather thangeometry()
.By default this property is
false
.See also
© 2022 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.