CGAL 4.12 - Three
|
#include <CGAL/Three/TextRenderer.h>
A TextItem is a string with properties, like coordinates, font and color, that is to be rendered in the viewer.
Public Member Functions | |
TextItem () | |
The default constructor. | |
TextItem (float p_x, float p_y, float p_z, QString p_text, bool p_3D=true, QFont font=QFont(), QColor p_color=Qt::black, bool always_visible=false) | |
The construtor for the TextItem. More... | |
QString | text () const |
Accessor for the string. More... | |
QVector3D | position () |
The center of the item. More... | |
float | width () |
The text's width in pixels. | |
float | height () |
The text's height in pixels. | |
QFont | font () |
Accessor for the text's font. | |
QColor | color () |
Accessor for the text's color. | |
bool | is_3D () const |
Specifies if the item's coordinates are World or Screen coordinates. More... | |
bool | is_always_visible () |
Specifies if the item may be hidden. More... | |
TextItem::TextItem | ( | float | p_x, |
float | p_y, | ||
float | p_z, | ||
QString | p_text, | ||
bool | p_3D = true , |
||
QFont | font = QFont() , |
||
QColor | p_color = Qt::black , |
||
bool | always_visible = false |
||
) |
The construtor for the TextItem.
p_x,p_y,p_z | the coordinates of the TextItem. |
p_text | the text to render. |
p_3D | If true : the TextRenderer will convert the coordinates into world coordinates. If false : the TextRenderer will display the text in screen coordinates, and ignore p_z |
font | the font used for the rendering. |
p_color | the color of the text. |
always_visible | overrides Viewer_interface::testDisplayId() if true; |
bool TextItem::is_3D | ( | ) | const |
Specifies if the item's coordinates are World or Screen coordinates.
bool TextItem::is_always_visible | ( | ) |
Specifies if the item may be hidden.
QVector3D TextItem::position | ( | ) |
The center of the item.
QString TextItem::text | ( | ) | const |
Accessor for the string.