VAPOR3 3.9.4
|
Utitlity wrapper for Font class. More...
#include <TextLabel.h>
Public Types | |
enum | Alignment { Left , Center , Right , Top , Bottom } |
Public Member Functions | |
TextLabel (GLManager *glManager, const std::string &fontName, unsigned int fontSize) | |
void | DrawText (const glm::vec3 &position, const std::string &text) |
void | DrawText (const glm::vec2 &position, const std::string &text) |
Font * | GetFont () const |
Public Attributes | |
std::string | FontName |
unsigned int | FontSize |
glm::vec4 | BackgroundColor |
glm::vec4 | ForegroundColor |
Alignment | HorizontalAlignment |
Alignment | VerticalAlignment |
float | Padding |
Utitlity wrapper for Font class.
Creates a 2D label for a point in 2D or 3D space
Definition at line 21 of file TextLabel.h.
Enumerator | |
---|---|
Left | |
Center | |
Right | |
Top | |
Bottom |
Definition at line 25 of file TextLabel.h.
VAPoR::TextLabel::TextLabel | ( | GLManager * | glManager, |
const std::string & | fontName, | ||
unsigned int | fontSize | ||
) |
void VAPoR::TextLabel::DrawText | ( | const glm::vec2 & | position, |
const std::string & | text | ||
) |
void VAPoR::TextLabel::DrawText | ( | const glm::vec3 & | position, |
const std::string & | text | ||
) |
Draws a floating text label if a 3D perspective is used or simply text if using a pixel coordinate space matrix. Formatting is determined by the public variables.
[in] | position | will be transformed according to the current ModelViewProjection matrix |
[in] | text | will be drawn |
Font * VAPoR::TextLabel::GetFont | ( | ) | const |
glm::vec4 VAPoR::TextLabel::BackgroundColor |
Definition at line 29 of file TextLabel.h.
std::string VAPoR::TextLabel::FontName |
Definition at line 27 of file TextLabel.h.
unsigned int VAPoR::TextLabel::FontSize |
Definition at line 28 of file TextLabel.h.
glm::vec4 VAPoR::TextLabel::ForegroundColor |
Definition at line 30 of file TextLabel.h.
Alignment VAPoR::TextLabel::HorizontalAlignment |
Definition at line 31 of file TextLabel.h.
float VAPoR::TextLabel::Padding |
Definition at line 33 of file TextLabel.h.
Alignment VAPoR::TextLabel::VerticalAlignment |
Definition at line 32 of file TextLabel.h.