FIFE  6e1afdbeda11afe9ac53e6023a4be96ef88f1dc6
FIFE::IFont Class Referenceabstract

Pure abstract Font interface. More...

#include <ifont.h>

+ Inheritance diagram for FIFE::IFont:
+ Collaboration diagram for FIFE::IFont:

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 () const =0
 Checks if anti aliasing is used. More...
 
virtual void setBoldStyle (bool style)=0
 Sets the use of bold style. More...
 
virtual bool isBoldStyle () const =0
 Checks if bold style is used. More...
 
virtual void setItalicStyle (bool style)=0
 Sets the use of italic style. More...
 
virtual bool isItalicStyle () const =0
 Checks if italic style is used. More...
 
virtual void setUnderlineStyle (bool style)=0
 Sets the use of underline style. More...
 
virtual bool isUnderlineStyle () const =0
 Checks if underline style is used. More...
 
virtual void setStrikethroughStyle (bool style)=0
 Sets the use of strikethrough style. More...
 
virtual bool isStrikethroughStyle () const =0
 Checks if strikethrough style is used. More...
 
virtual void setDynamicColoring (bool coloring)=0
 
virtual bool isDynamicColoring () const =0
 
virtual int32_t getStringIndexAt (const std::string &text, int32_t x) const =0
 
virtual ImagegetAsImage (const std::string &text)=0
 Gets given text as Image The rsulting image is pooled, so it's not that time critical. More...
 
virtual ImagegetAsImageMultiline (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
 

Detailed Description

Pure abstract Font interface.

Definition at line 43 of file ifont.h.

Constructor & Destructor Documentation

Member Function Documentation

virtual Image* FIFE::IFont::getAsImage ( const std::string &  text)
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(), FIFE::CellRenderer::render(), and ~IFont().

+ Here is the caller graph for this function:

virtual Image* FIFE::IFont::getAsImageMultiline ( const std::string &  text)
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(), FIFE::GenericRendererTextInfo::render(), and ~IFont().

+ Here is the caller graph for this function:

virtual SDL_Color FIFE::IFont::getColor ( ) const
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(), FIFE::CoordinateRenderer::render(), and ~IFont().

+ Here is the caller graph for this function:

virtual int32_t FIFE::IFont::getGlyphSpacing ( ) const
pure virtual

Gets the spacing between letters in pixels.

Returns
the spacing.

Implemented in FIFE::FontBase, and FIFE::GuiFont.

Referenced by FIFE::GuiFont::getGlyphSpacing(), and ~IFont().

+ Here is the caller graph for this function:

virtual int32_t FIFE::IFont::getHeight ( ) const
pure virtual

gets height of this font

Implemented in FIFE::GuiFont, FIFE::TrueTypeFont, and FIFE::ImageFontBase.

Referenced by FIFE::FontBase::getAsImageMultiline(), FIFE::GuiFont::getHeight(), and ~IFont().

+ Here is the caller graph for this function:

virtual int32_t FIFE::IFont::getRowSpacing ( ) const
pure virtual

Gets the spacing between rows in pixels.

Returns
the spacing.

Implemented in FIFE::FontBase, and FIFE::GuiFont.

Referenced by FIFE::GuiFont::getRowSpacing(), and ~IFont().

+ Here is the caller graph for this function:

virtual int32_t FIFE::IFont::getStringIndexAt ( const std::string &  text,
int32_t  x 
) const
pure virtual

Implemented in FIFE::FontBase, and FIFE::GuiFont.

Referenced by FIFE::GuiFont::getStringIndexAt(), and ~IFont().

+ Here is the caller graph for this function:

virtual int32_t FIFE::IFont::getWidth ( const std::string &  text) const
pure virtual

gets width of given text

Implemented in FIFE::GuiFont, FIFE::TrueTypeFont, and FIFE::ImageFontBase.

Referenced by FIFE::FontBase::getStringIndexAt(), FIFE::GuiFont::getWidth(), FIFE::FontBase::splitTextToWidth(), and ~IFont().

+ Here is the caller graph for this function:

virtual void FIFE::IFont::invalidate ( )
pure virtual

Implemented in FIFE::GuiFont, and FIFE::FontBase.

Referenced by FIFE::GuiFont::invalidate(), and ~IFont().

+ Here is the caller graph for this function:

virtual bool FIFE::IFont::isAntiAlias ( ) const
pure virtual

Checks if anti aliasing is used.

Returns
true if anti aliasing is used.

Implemented in FIFE::FontBase, and FIFE::GuiFont.

Referenced by FIFE::GuiFont::isAntiAlias(), and ~IFont().

+ Here is the caller graph for this function:

virtual bool FIFE::IFont::isBoldStyle ( ) const
pure virtual

Checks if bold style is used.

Returns
true if bold style is used.

Implemented in FIFE::FontBase, and FIFE::GuiFont.

Referenced by FIFE::GuiFont::isBoldStyle(), and ~IFont().

+ Here is the caller graph for this function:

virtual bool FIFE::IFont::isDynamicColoring ( ) const
pure virtual

Implemented in FIFE::FontBase, and FIFE::GuiFont.

Referenced by FIFE::GuiFont::isDynamicColoring(), and ~IFont().

+ Here is the caller graph for this function:

virtual bool FIFE::IFont::isItalicStyle ( ) const
pure virtual

Checks if italic style is used.

Returns
true if italic style is used.

Implemented in FIFE::FontBase, and FIFE::GuiFont.

Referenced by FIFE::GuiFont::isItalicStyle(), and ~IFont().

+ Here is the caller graph for this function:

virtual bool FIFE::IFont::isStrikethroughStyle ( ) const
pure virtual

Checks if strikethrough style is used.

Returns
true if strikethrough style is used.

Implemented in FIFE::FontBase, and FIFE::GuiFont.

Referenced by FIFE::GuiFont::isStrikethroughStyle(), and ~IFont().

+ Here is the caller graph for this function:

virtual bool FIFE::IFont::isUnderlineStyle ( ) const
pure virtual

Checks if underline style is used.

Returns
true if underline style is used.

Implemented in FIFE::FontBase, and FIFE::GuiFont.

Referenced by FIFE::GuiFont::isUnderlineStyle(), and ~IFont().

+ Here is the caller graph for this function:

virtual void FIFE::IFont::setAntiAlias ( bool  antiAlias)
pure virtual

Sets the use of anti aliasing.

Parameters
antiAliastrue for use of anti aliasing.

Implemented in FIFE::FontBase, and FIFE::GuiFont.

Referenced by FIFE::GuiFont::setAntiAlias(), and ~IFont().

+ Here is the caller graph for this function:

virtual void FIFE::IFont::setBoldStyle ( bool  style)
pure virtual

Sets the use of bold style.

Parameters
stlyeTrue for use of bold style.

Implemented in FIFE::TrueTypeFont, FIFE::FontBase, and FIFE::GuiFont.

Referenced by FIFE::GuiFont::setBoldStyle(), and ~IFont().

+ Here is the caller graph for this function:

virtual void FIFE::IFont::setColor ( uint8_t  r,
uint8_t  g,
uint8_t  b,
uint8_t  a = 255 
)
pure virtual

Set the color the text should be rendered in.

Implemented in FIFE::TrueTypeFont, FIFE::GuiFont, and FIFE::ImageFontBase.

Referenced by FIFE::FloatingTextRenderer::render(), FIFE::CoordinateRenderer::render(), FIFE::GuiFont::setColor(), and ~IFont().

+ Here is the caller graph for this function:

virtual void FIFE::IFont::setDynamicColoring ( bool  coloring)
pure virtual

Implemented in FIFE::FontBase, and FIFE::GuiFont.

Referenced by FIFE::GuiFont::setDynamicColoring(), and ~IFont().

+ Here is the caller graph for this function:

virtual void FIFE::IFont::setGlyphSpacing ( int32_t  spacing)
pure virtual

Sets the spacing between letters in pixels.

Default is 0 pixels. The spacing can be negative.

Parameters
spacingthe spacing in pixels.

Implemented in FIFE::FontBase, and FIFE::GuiFont.

Referenced by FIFE::GuiFont::setGlyphSpacing(), and ~IFont().

+ Here is the caller graph for this function:

virtual void FIFE::IFont::setItalicStyle ( bool  style)
pure virtual

Sets the use of italic style.

Parameters
stlyeTrue for use of italic style.

Implemented in FIFE::TrueTypeFont, FIFE::FontBase, and FIFE::GuiFont.

Referenced by FIFE::GuiFont::setItalicStyle(), and ~IFont().

+ Here is the caller graph for this function:

virtual void FIFE::IFont::setRowSpacing ( int32_t  spacing)
pure virtual

Sets the spacing between rows in pixels.

Default is 0 pixels. The spacing can be negative.

Parameters
spacingthe spacing in pixels.

Implemented in FIFE::FontBase, and FIFE::GuiFont.

Referenced by FIFE::GuiFont::setRowSpacing(), and ~IFont().

+ Here is the caller graph for this function:

virtual void FIFE::IFont::setStrikethroughStyle ( bool  style)
pure virtual

Sets the use of strikethrough style.

Parameters
stlyeTrue for use of strikethrough style.

Implemented in FIFE::TrueTypeFont, FIFE::FontBase, and FIFE::GuiFont.

Referenced by FIFE::GuiFont::setStrikethroughStyle(), and ~IFont().

+ Here is the caller graph for this function:

virtual void FIFE::IFont::setUnderlineStyle ( bool  style)
pure virtual

Sets the use of underline style.

Parameters
stlyeTrue for use of underline style.

Implemented in FIFE::TrueTypeFont, FIFE::FontBase, and FIFE::GuiFont.

Referenced by FIFE::GuiFont::setUnderlineStyle(), and ~IFont().

+ Here is the caller graph for this function:

virtual std::string FIFE::IFont::splitTextToWidth ( const std::string &  text,
int32_t  render_width 
)
pure virtual

Implemented in FIFE::FontBase, and FIFE::GuiFont.

Referenced by FIFE::GuiFont::splitTextToWidth(), and ~IFont().

+ Here is the caller graph for this function:


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