QSGBasicGeometryNode Class

QSGBasicGeometryNode 类是基于几何图形的节点的基类。更多

Header: #include <QSGBasicGeometryNode>
CMake: find_package(Qt6 REQUIRED COMPONENTS Quick)
target_link_libraries(mytarget PRIVATE Qt6::Quick)
qmake: QT += quick
继承: QSGNode
继承于

QSGClipNodeQSGGeometryNode

公共函数

virtual ~QSGBasicGeometryNode() override
QSGGeometry *geometry()
const QSGGeometry *geometry() const
void setGeometry(QSGGeometry *geometry)

详细说明

QSGBasicGeometryNode 类本身不应被使用。它只是封装了QSGGeometryNodeQSGClipNode 类之间的共享功能。

注意: 所有带有 QSG 前缀的类都只能在场景图的渲染线程中使用。更多信息,请参阅场景图和渲染

成员函数文档

[override virtual noexcept] QSGBasicGeometryNode::~QSGBasicGeometryNode()

删除此QSGBasicGeometryNode

如果节点设置了QSGNode::OwnsGeometry 标志,则也会删除其指向的几何对象。默认情况下未设置此标记。

QSGGeometry *QSGBasicGeometryNode::geometry()

返回此节点的几何图形。

几何体默认为空。

另请参见 setGeometry()。

const QSGGeometry *QSGBasicGeometryNode::geometry() const

返回此节点的几何图形。

几何图形默认为空。

void QSGBasicGeometryNode::setGeometry(QSGGeometry *geometry)

将此节点的几何图形设置为geometry

如果节点设置了QSGNode::OwnsGeometry 标志,则也会删除其指向的几何对象。默认情况下未设置此标记。

如果在没有再次调用 setGeometry() 的情况下更改了几何体,用户还必须使用QSGNode::markDirty() 将几何体标记为 dirty。

另请参阅 geometry() 和markDirty()。

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