|
|
| Text (void) |
| | Default constructor.
|
|
| ~Text (void) |
| | Destructor.
|
|
| Text (const std::string &text, const Font &font, uint character_size=nom::DEFAULT_FONT_SIZE, const Color4i &text_color=Color4i::White) |
| | Construct a Text, initializing it with a text string, a nom::Font object reference and character size.
|
|
| Text (const std::string &text, Font *font, uint character_size=nom::DEFAULT_FONT_SIZE, const Color4i &text_color=Color4i::White) |
| | Construct a Text, initializing it with a text string, a nom::Font object pointer and character size.
|
| | Text (const self_type &rhs) |
| | Copy constructor.
|
| self_type & | operator= (const self_type &rhs) |
| | Copy assignment operator.
|
| virtual void | set_position (const Point2i &pos) override |
| | Set the position of the rendered text.
|
|
Text * | clone () const |
| | Implements the required IDrawable::clone method.
|
| ObjectTypeInfo | type () const override |
| | Re-implements the IObject::type method.
|
|
const Font & | font () const |
| Texture * | clone_texture () const |
| | Get a deep-copy instance of the underlying texture used for the text rendering.
|
|
bool | valid (void) const |
| | Obtain validity of the Text object.
|
| int | text_width (const std::string &text_buffer) const |
| | Obtain the text width (in pixels) of the set text.
|
| sint | text_height (const std::string &text_string) const |
| | Obtain the text height in pixels of the set text.
|
|
const std::string & | text (void) const |
| | Get text string.
|
|
const Color4i & | color (void) const |
| | Get text color.
|
|
uint32 | style (void) const |
| | Get text style.
|
|
uint | text_size (void) const |
| | Get text character size (in pixels?).
|
| void | set_font (const Font &font) |
| | Set the font to use in rendering text.
|
| void | set_font (Font *font) |
| | Set the font to use in rendering text.
|
|
void | set_text (const std::string &text) |
| | Set the text string to be rendered.
|
| void | set_text_size (uint character_size) |
| | Set the text's font point size.
|
|
void | set_color (const Color4i &text_color) |
| | Set text's font color.
|
| void | set_style (uint32 style) |
| | Set the text's rendering style for the font.
|
|
void | set_text_kerning (bool state) |
| | Set the use of rendering glyphs with respect to kerning offsets, when supported by the underlying font type.
|
| void | draw (RenderTarget &target) const override |
|
| Transformable (const Point2i &pos, const Size2i &size) |
|
| Transformable (const IntRect &bounds) |
| | Construct an object using a complete set of coordinates (bounds).
|
| ObjectTypeInfo | type () const override |
| | Re-implements the IObject::type method.
|
|
const Point2i & | position (void) const |
| | Getter for stored positioning coordinates.
|
|
const Size2i & | size (void) const |
| | Getter for stored size dimensions.
|
| virtual void | set_size (const Size2i &size) |
| | Set the size dimensions– width & height rendering coordinates of the object.
|
| virtual void | set_bounds (const IntRect &bounds) |
| | Set the complete bounds of the object – position (X, Y) and size (width and height) dimensions.
|
| void | set_position (int x, int y) |
| void | set_size (int w, int h) |
| virtual void | translate (const Point2i &pos) |
| | IDrawable (void) |
| | Do nothing at all default constructor.
|
| virtual | ~IDrawable (void) |
| | Do nothing at all destructor.
|
|
| IObject (void) |
| | Default constructor.
|
|
virtual | ~IObject (void) |
| | Virtual destructor.
|
| virtual bool | is_type (const ObjectTypeInfo &rhs) const |
| | Compare this object type with another object's type.
|
[TODO: DESCRIPTION]
#include <iostream>
#include <nomlib/graphics.hpp>
std::string file_path = "absolute_path_to_truetype_font.ttf";
bool running = true;
if( font.load( file_path ) == false )
{
}
while( running == true )
{
}
Font interface wrapper for nom::IFont derived objects.
virtual void set_position(const Point2i &pos) override
Set the position of the rendered text.
void draw(RenderTarget &target) const override
void set_text(const std::string &text)
Set the text string to be rendered.
void set_text_size(uint character_size)
Set the text's font point size.
void set_font(const Font &font)
Set the font to use in rendering text.
void set_color(const Color4i &text_color)
Set text's font color.
Definition at line 46 of file Text.hpp.