内容表

上一话题

QSGBasicGeometryNode

下一话题

QSGDynamicTexture

QSGClipNode

QSGClipNode class implements the clipping functionality in the scene graph. 更多

Inheritance diagram of PySide2.QtQuick.QSGClipNode

概要

函数

详细描述

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.

注意

All classes with QSG prefix should be used solely on the scene graph’s rendering thread. See 场景图形和渲染 了解更多信息。

class QSGClipNode

创建新 QSGClipNode without a geometry.

The clip node must have a geometry before it can be added to the scene graph.

PySide2.QtQuick.QSGClipNode. clipRect ( )
返回类型

QRectF

Returns the clip rect of this node.

另请参阅

setClipRect()

PySide2.QtQuick.QSGClipNode. isRectangular ( )
返回类型

bool

Returns if this clip node has a rectangular clip.

PySide2.QtQuick.QSGClipNode. setClipRect ( arg__1 )
参数

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

另请参阅

clipRect()

PySide2.QtQuick.QSGClipNode. setIsRectangular ( rectHint )
参数

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() 而不是 geometry() .

默认情况下此特性为 false .

另请参阅

isRectangular()