FIFE
|
Pure abstract Font interface. More...
#include <ifont.h>
Public Member Functions | |
virtual | ~IFont () |
virtual void | setRowSpacing (int32_t spacing)=0 |
Sets the spacing between rows in pixels. More... | |
virtual int32_t | getRowSpacing () const =0 |
Gets the spacing between rows in pixels. More... | |
virtual void | setGlyphSpacing (int32_t spacing)=0 |
Sets the spacing between letters in pixels. More... | |
virtual int32_t | getGlyphSpacing () const =0 |
Gets the spacing between letters in pixels. More... | |
virtual void | setAntiAlias (bool antiAlias)=0 |
Sets the use of anti aliasing. More... | |
virtual bool | isAntiAlias ()=0 |
Checks if anti aliasing is used. More... | |
virtual int32_t | getStringIndexAt (const std::string &text, int32_t x) const =0 |
virtual Image * | getAsImage (const std::string &text)=0 |
Gets given text as Image The rsulting image is pooled, so it's not that time critical. More... | |
virtual Image * | getAsImageMultiline (const std::string &text)=0 |
Gets given text as Image. More... | |
virtual std::string | splitTextToWidth (const std::string &text, int32_t render_width)=0 |
virtual void | setColor (uint8_t r, uint8_t g, uint8_t b, uint8_t a=255)=0 |
Set the color the text should be rendered in. More... | |
virtual SDL_Color | getColor () const =0 |
Get the color the text was rendered in. More... | |
virtual int32_t | getWidth (const std::string &text) const =0 |
gets width of given text More... | |
virtual int32_t | getHeight () const =0 |
gets height of this font More... | |
virtual void | invalidate ()=0 |
|
pure virtual |
Gets given text as Image The rsulting image is pooled, so it's not that time critical.
Implemented in FIFE::FontBase, and FIFE::GuiFont.
Referenced by FIFE::GuiFont::getAsImage(), FIFE::CoordinateRenderer::render(), and FIFE::CellRenderer::render().
|
pure virtual |
Gets given text as Image.
Text is splitted on multiple lines based "\n" marks The rsulting image is pooled, so it's not that time critical
Implemented in FIFE::FontBase, and FIFE::GuiFont.
Referenced by FIFE::GuiFont::getAsImageMultiline(), FIFE::FloatingTextRenderer::render(), FIFE::OffRendererTextInfo::render(), and FIFE::GenericRendererTextInfo::render().
|
pure virtual |
Get the color the text was rendered in.
Implemented in FIFE::FontBase, and FIFE::GuiFont.
Referenced by FIFE::GuiFont::getColor(), FIFE::FloatingTextRenderer::render(), and FIFE::CoordinateRenderer::render().
|
pure virtual |
Gets the spacing between letters in pixels.
Implemented in FIFE::FontBase, and FIFE::GuiFont.
Referenced by FIFE::GuiFont::getGlyphSpacing().
|
pure virtual |
gets height of this font
Implemented in FIFE::TrueTypeFont, FIFE::ImageFontBase, and FIFE::GuiFont.
Referenced by FIFE::FontBase::getAsImageMultiline(), and FIFE::GuiFont::getHeight().
|
pure virtual |
Gets the spacing between rows in pixels.
Implemented in FIFE::FontBase, and FIFE::GuiFont.
Referenced by FIFE::GuiFont::getRowSpacing().
|
pure virtual |
Implemented in FIFE::FontBase, and FIFE::GuiFont.
Referenced by FIFE::GuiFont::getStringIndexAt().
|
pure virtual |
gets width of given text
Implemented in FIFE::TrueTypeFont, FIFE::GuiFont, and FIFE::ImageFontBase.
Referenced by FIFE::FontBase::getStringIndexAt(), FIFE::GuiFont::getWidth(), and FIFE::FontBase::splitTextToWidth().
|
pure virtual |
Implemented in FIFE::GuiFont, and FIFE::FontBase.
Referenced by FIFE::GuiFont::invalidate().
|
pure virtual |
Checks if anti aliasing is used.
Implemented in FIFE::FontBase, and FIFE::GuiFont.
Referenced by FIFE::GuiFont::isAntiAlias().
|
pure virtual |
Sets the use of anti aliasing.
antiAlias | true for use of anti aliasing. |
Implemented in FIFE::FontBase, and FIFE::GuiFont.
Referenced by FIFE::GuiFont::setAntiAlias().
|
pure virtual |
Set the color the text should be rendered in.
Implemented in FIFE::GuiFont.
Referenced by FIFE::FloatingTextRenderer::render(), FIFE::CoordinateRenderer::render(), and FIFE::GuiFont::setColor().
|
pure virtual |
Sets the spacing between letters in pixels.
Default is 0 pixels. The spacing can be negative.
spacing | the spacing in pixels. |
Implemented in FIFE::FontBase, and FIFE::GuiFont.
Referenced by FIFE::GuiFont::setGlyphSpacing().
|
pure virtual |
Sets the spacing between rows in pixels.
Default is 0 pixels. The spacing can be negative.
spacing | the spacing in pixels. |
Implemented in FIFE::FontBase, and FIFE::GuiFont.
Referenced by FIFE::GuiFont::setRowSpacing().
|
pure virtual |
Implemented in FIFE::FontBase, and FIFE::GuiFont.
Referenced by FIFE::GuiFont::splitTextToWidth().