|
gltk
0.3
a C++ widget library built on GLUT
|
a single line text drawing object More...
#include <textdraw.hh>
Public Member Functions | |
| void | set_text (std::string const &text) |
| set the text | |
| std::string const & | get_text () const |
| get the text | |
| void * | get_font () const |
| get used font | |
| int | get_ascent () const |
| get the ascent of font used | |
Protected Member Functions | |
| void | draw_text (Align xalign=ALIGN_START, Align yalign=ALIGN_START, int width_limit=0) |
| draw the text at the current raster position | |
| int | text_height () const |
| get height of text | |
| int | text_width () const |
| get width of text | |
| int | text_width (std::string const &string) const |
| get width of a given string | |
a single line text drawing object
| void TextDraw::draw_text | ( | Align | xalign = ALIGN_START, |
| Align | yalign = ALIGN_START, |
||
| int | width_limit = 0 |
||
| ) | [protected] |
draw the text at the current raster position
| xalign | horizontal alignment |
| yalign | vertical alignment |
| width_limit | width limit of drawn text |
| int TextDraw::text_width | ( | std::string const & | string | ) | const [protected] |
get width of a given string
| string | string whoes width is to be calculated |