List of all members.
Public Member Functions |
void | begin (GLWidget *widget) |
void | end () |
int | draw (const Eigen::Vector3d &pos, const QString &string) |
int | draw (int x, int y, const QString &string) |
bool | isActive () |
Member Function Documentation
Call this before drawing any text. This method saves the GL state and changes it to prepare for text rendering.
- Parameters:
-
widget | The widget to use for rendering |
Draw text inside the 3D scene. Must be called between begin() and end(). The text is centered (both horizontally and vertically) around the specified position.
- Parameters:
-
pos | the position of the text in the scene's coordinate system |
string | the QString to render |
- Returns:
- the height in pixels of the text just rendered (0 for an empty string).
References QFontMetrics::height(), and QFontMetrics::width().
Draw 2D text at the position (x,y) in window coordinates. Must be called between begin() and end(). (0,0) is the top-left corner.
- Parameters:
-
x | the x-coordinate |
y | the y-coordinate |
string | the QString to render |
- Returns:
- the height in pixels of the text just rendered (0 for an empty string).
References QFontMetrics::height().
Call this after drawing text. This method restores the GL state to what it was when begin() was called.
The documentation for this class was generated from the following files:
- /home/kitware/dashboards/avogadro/libavogadro/src/textrenderer_p.h
- /home/kitware/dashboards/avogadro/libavogadro/src/textrenderer_p.cpp