22 #ifndef FIFE_GUI_FONT_H
23 #define FIFE_GUI_FONT_H
28 #include <guichan/font.hpp>
48 void drawString(gcn::Graphics* graphics,
const std::string& text, int32_t x, int32_t y);
49 void drawMultiLineString(gcn::Graphics* graphics,
const std::string& text, int32_t x, int32_t y);
50 std::string
splitTextToWidth (
const std::string& text, int32_t render_width);
62 int32_t
getWidth(
const std::string& text)
const;
int32_t getWidth(const std::string &text) const
gets width of given text
std::string splitTextToWidth(const std::string &text, int32_t render_width)
SDL_Color getColor() const
Get the color the text was rendered in.
void drawMultiLineString(gcn::Graphics *graphics, const std::string &text, int32_t x, int32_t y)
GuiFont(IFont *font)
Constructor Takes the ownership of given font.
Image * getAsImage(const std::string &text)
Gets given text as Image The rsulting image is pooled, so it's not that time critical.
int32_t getStringIndexAt(const std::string &text, int32_t x) const
void setRowSpacing(int32_t spacing)
Sets the spacing between rows in pixels.
void drawString(gcn::Graphics *graphics, const std::string &text, int32_t x, int32_t y)
Image * getAsImageMultiline(const std::string &text)
Gets given text as Image.
void setGlyphSpacing(int32_t spacing)
Sets the spacing between letters in pixels.
int32_t getHeight() const
gets height of this font
Pure abstract Font interface.
void setAntiAlias(bool antiAlias)
Sets the use of anti aliasing.
int32_t getGlyphSpacing() const
Gets the spacing between letters in pixels.
bool isAntiAlias()
Checks if anti aliasing is used.
void setColor(uint8_t r, uint8_t g, uint8_t b, uint8_t a=255)
Set the color the text should be rendered in.
int32_t getRowSpacing() const
Gets the spacing between rows in pixels.