本页内容

ExtrudedTextGeometry QML Type

提供挤出文本的几何形状。更多...

Import Statement: import QtQuick3D.Helpers
Since: Qt 6.9
Inherits:

Geometry

属性

详细说明

ExtrudedTextGeometry 提供用于挤出文本的几何体。文本沿 z 轴进行挤出。可以设置文本和字体,并可控制挤出深度。生成的几何体大小由 scale 和 depth 属性控制。几何体的拓扑结构由 font.pointSize 定义。

网格的原点位于文本基线的左后端。

属性文档

asynchronous : bool

该属性用于指定几何体生成是否应以异步方式进行。

depth : real

该属性存储了挤出的深度。

font : font

该属性用于指定渲染文本时所使用的字体。

注意:网格几何体 根据字体的 pointSize 进行归一化处理,因此 pointSize 越大,文本会显得越平滑,而非越大。不应使用 pixelSize。

scale : real

该属性存储一个标量值,用于指定几何体的缩放比例。该属性仅影响文本的大小,而不影响挤出的深度。

status : bool [read-only]

当“asynchronous”为true时,该属性保存几何体生成的状态。

常量描述
ExtrudedTextGeometry.Null几何生成尚未开始
ExtrudedTextGeometry.Ready几何生成已完成。
ExtrudedTextGeometry.Loading正在生成几何图形。
ExtrudedTextGeometry.Error几何体生成失败。

text : string

此属性用于存储将被挤出的文本。

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