FIFE 2008.0
FIFE::FontBase Class Reference

#include <fontbase.h>

Inheritance diagram for FIFE::FontBase:
Collaboration diagram for FIFE::FontBase:

List of all members.

Public Member Functions

void setRowSpacing (int spacing)
int getRowSpacing () const
void setGlyphSpacing (int spacing)
int getGlyphSpacing () const
void setAntiAlias (bool antiAlias)
bool isAntiAlias ()
ImagegetAsImage (const std::string &text)
ImagegetAsImageMultiline (const std::string &text)
SDL_Color getColor () const

Detailed Description

Abstract Font Base Class Uses a pool for rendered strings.

See also:
TextRenderPool

Definition at line 48 of file fontbase.h.


Member Function Documentation

Image * FIFE::FontBase::getAsImage ( const std::string &  text) [virtual]

Gets given text as Image The rsulting image is pooled, so it's not that time critical

Implements FIFE::AbstractFont.

Definition at line 113 of file fontbase.cpp.

References FIFE::TextRenderPool::addRenderedText(), and FIFE::TextRenderPool::getRenderedText().

Image * FIFE::FontBase::getAsImageMultiline ( const std::string &  text) [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

Implements FIFE::AbstractFont.

Definition at line 123 of file fontbase.cpp.

References FIFE::TextRenderPool::addRenderedText(), FIFE::AbstractFont::getHeight(), FIFE::TextRenderPool::getRenderedText(), and getRowSpacing().

SDL_Color FIFE::FontBase::getColor ( ) const [virtual]

Get the color the text was rendered in

Implements FIFE::AbstractFont.

Definition at line 81 of file fontbase.cpp.

Referenced by FIFE::TextRenderPool::addRenderedText(), and FIFE::TextRenderPool::getRenderedText().

Here is the caller graph for this function:

int FIFE::FontBase::getGlyphSpacing ( ) const [virtual]

Gets the spacing between letters in pixels.

Returns:
the spacing.

Implements FIFE::AbstractFont.

Definition at line 69 of file fontbase.cpp.

Referenced by FIFE::TextRenderPool::addRenderedText(), FIFE::TextRenderPool::getRenderedText(), and FIFE::ImageFontBase::getWidth().

Here is the caller graph for this function:

int FIFE::FontBase::getRowSpacing ( ) const [virtual]

Gets the spacing between rows in pixels.

Returns:
the spacing.

Implements FIFE::AbstractFont.

Definition at line 61 of file fontbase.cpp.

Referenced by FIFE::TextRenderPool::addRenderedText(), getAsImageMultiline(), FIFE::TrueTypeFont::getHeight(), and FIFE::TextRenderPool::getRenderedText().

Here is the caller graph for this function:

bool FIFE::FontBase::isAntiAlias ( ) [virtual]

Checks if anti aliasing is used.

Returns:
true if anti aliasing is used.

Implements FIFE::AbstractFont.

Definition at line 77 of file fontbase.cpp.

Referenced by FIFE::TextRenderPool::addRenderedText(), and FIFE::TextRenderPool::getRenderedText().

Here is the caller graph for this function:

void FIFE::FontBase::setAntiAlias ( bool  antiAlias) [virtual]

Sets the use of anti aliasing..

Parameters:
antaAliastrue for use of antia aliasing.

Implements FIFE::AbstractFont.

Definition at line 73 of file fontbase.cpp.

void FIFE::FontBase::setGlyphSpacing ( int  spacing) [virtual]

Sets the spacing between letters in pixels. Default is 0 pixels. The spacing can be negative.

Parameters:
spacingthe spacing in pixels.

Implements FIFE::AbstractFont.

Definition at line 65 of file fontbase.cpp.

void FIFE::FontBase::setRowSpacing ( int  spacing) [virtual]

Sets the spacing between rows in pixels. Default is 0 pixels. The spacing can be negative.

Parameters:
spacingthe spacing in pixels.

Implements FIFE::AbstractFont.

Definition at line 57 of file fontbase.cpp.


The documentation for this class was generated from the following files:
 All Classes Namespaces Functions Variables Enumerations Enumerator