FIFE
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
FIFE::SubImageFont Class Reference

Imagefont that is able to read glyphs from single image sheet, see e.g. More...

#include <subimagefont.h>

+ Inheritance diagram for FIFE::SubImageFont:
+ Collaboration diagram for FIFE::SubImageFont:

Public Member Functions

 SubImageFont (const std::string &filename, const std::string &glyphs)
 Constructor. More...
 
 ~SubImageFont ()
 
- Public Member Functions inherited from FIFE::ImageFontBase
 ImageFontBase ()
 Constructor. More...
 
virtual ~ImageFontBase ()
 Destructor. More...
 
virtual int32_t getWidth (const std::string &text) const
 Get the width in pixels a given text would occupy. More...
 
virtual int32_t getHeight () const
 Get the height in pixels a text line would occupy. More...
 
virtual SDL_Surface * renderString (const std::string &text)
 
virtual void setColor (Uint8 r, Uint8 g, Uint8 b, Uint8 a=255)
 
- Public Member Functions inherited from FIFE::FontBase
 FontBase ()
 
virtual ~FontBase ()
 
void invalidate ()
 
void setRowSpacing (int32_t spacing)
 Sets the spacing between rows in pixels. More...
 
int32_t getRowSpacing () const
 Gets the spacing between rows in pixels. More...
 
void setGlyphSpacing (int32_t spacing)
 Sets the spacing between letters in pixels. More...
 
int32_t getGlyphSpacing () const
 Gets the spacing between letters in pixels. More...
 
void setAntiAlias (bool antiAlias)
 Sets the use of anti aliasing. More...
 
bool isAntiAlias ()
 Checks if anti aliasing is used. More...
 
virtual int32_t getStringIndexAt (const std::string &text, int32_t x) const
 
ImagegetAsImage (const std::string &text)
 Gets given text as Image The rsulting image is pooled, so it's not that time critical. More...
 
ImagegetAsImageMultiline (const std::string &text)
 Gets given text as Image. More...
 
std::string splitTextToWidth (const std::string &text, int32_t render_width)
 
SDL_Color getColor () const
 Get the color the text was rendered in. More...
 
- Public Member Functions inherited from FIFE::IFont
virtual ~IFont ()
 
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...
 

Private Attributes

SDL_Color m_colorkey
 

Additional Inherited Members

- Protected Types inherited from FIFE::ImageFontBase
typedef std::map< int32_t,
s_glyph
type_glyphs
 
- Protected Attributes inherited from FIFE::ImageFontBase
type_glyphs m_glyphs
 
s_glyph m_placeholder
 
int32_t mHeight
 
int32_t mGlyphSpacing
 
int32_t mRowSpacing
 
std::string mFilename
 
bool mAntiAlias
 
- Protected Attributes inherited from FIFE::FontBase
TextRenderPool m_pool
 
SDL_Color mColor
 
int32_t mGlyphSpacing
 
int32_t mRowSpacing
 
std::string mFilename
 
bool m_antiAlias
 

Detailed Description

Imagefont that is able to read glyphs from single image sheet, see e.g.

guichan imagefontcollection (google for it)

Definition at line 44 of file subimagefont.h.

Constructor & Destructor Documentation

FIFE::SubImageFont::~SubImageFont ( )
inline

Definition at line 53 of file subimagefont.h.

Member Data Documentation

SDL_Color FIFE::SubImageFont::m_colorkey
private

Definition at line 55 of file subimagefont.h.

Referenced by SubImageFont().


The documentation for this class was generated from the following files: