QText2DEntity allows creation of a 2D text in 3D space. 更多...
头: | #include <Qt3DExtras/QText2DEntity> |
qmake: | QT += 3dextras |
实例化: | Text2DEntity |
继承: | Qt3DCore::QEntity |
QColor | color () const |
QFont | font () const |
float | height () const |
void | setColor (const QColor & color ) |
void | setFont (const QFont & font ) |
void | setHeight (float height ) |
void | setText (const QString & text ) |
void | setWidth (float width ) |
QString | text () const |
float | width () const |
void | colorChanged (const QColor & color ) |
void | fontChanged (const QFont & font ) |
void | heightChanged (float height ) |
void | textChanged (const QString & text ) |
void | widthChanged (float width ) |
The QText2DEntity renders text as triangles in the XY plane. The geometry will be fitted in the rectangle of specified width and height. If the resulting geometry is wider than the specified width, the remainder will be rendered on the new line.
The entity can be positionned in the scene by adding a transform component.
QText2DEntity will create geometry based on the shape of the glyphs and a solid material using the specified color.
Holds the color for the text item that is displayed in the Qt Quick scene.
访问函数:
QColor | color () const |
void | setColor (const QColor & color ) |
通知程序信号:
void | colorChanged (const QColor & color ) |
Holds the font for the text item that is displayed in the Qt Quick scene.
访问函数:
QFont | font () const |
void | setFont (const QFont & font ) |
通知程序信号:
void | fontChanged (const QFont & font ) |
Returns the height of the text item that is displayed in the Qt Quick scene.
访问函数:
float | height () const |
void | setHeight (float height ) |
通知程序信号:
void | heightChanged (float height ) |
Holds the text that is displayed in the Qt Quick scene.
访问函数:
QString | text () const |
void | setText (const QString & text ) |
通知程序信号:
void | textChanged (const QString & text ) |
Returns the width of the text item that is displayed in the Qt Quick scene.
访问函数:
float | width () const |
void | setWidth (float width ) |
通知程序信号:
void | widthChanged (float width ) |