CVD 0.8
|
Enumerations | |
enum | CVD::TEXT_STYLE { CVD::FILL = 0, CVD::OUTLINE = 1, CVD::NICE = 2, CVD::FILL = 0, CVD::OUTLINE = 1, CVD::NICE = 2 } |
enum | CVD::TEXT_STYLE { CVD::FILL = 0, CVD::OUTLINE = 1, CVD::NICE = 2, CVD::FILL = 0, CVD::OUTLINE = 1, CVD::NICE = 2 } |
Functions | |
void | CVD::glSetFont (const std::string &fontname) |
const std::string & | CVD::glGetFont () |
std::pair< double, double > | CVD::glDrawText (const std::string &text, enum TEXT_STYLE style=NICE, double spacing=1.5, double kerning=0.1) |
std::pair< double, double > | CVD::glGetExtends (const std::string &text, double spacing=1.5, double kerning=0.1) |
enum CVD::TEXT_STYLE |
different style for font rendering
Definition at line 631 of file gl_helpers.h.
enum CVD::TEXT_STYLE |
different style for font rendering
Definition at line 399 of file gles1_helpers.h.
void CVD::glSetFont | ( | const std::string & | fontname | ) |
sets the font to use for future font rendering commands.
currently sans, serif and mono are available.
fontname | string containing font name |
std::pair< double, double > CVD::glDrawText | ( | const std::string & | text, |
enum TEXT_STYLE | style = NICE , |
||
double | spacing = 1.5 , |
||
double | kerning = 0.1 |
||
) |
renders a string in GL using the current settings.
Font coordinates are +X along the line and +Y along the up direction of glyphs. The origin is at the top baseline at the left of the first character. Characters have a maximum size of 1. linefeed is interpreted as a new line and the start is offset in -Y direction by spacing . Individual characters are separated by kerning + plus their individual with.
text | string to be rendered, unknown characters are replaced with '?' |
style | rendering style |
spacing | distance between individual text lines |
kerning | distance between characters |