Public Member Functions

FIFE::FontBase Class Reference

#include <fontbase.h>

Inheritance diagram for FIFE::FontBase:
Inheritance graph
[legend]
Collaboration diagram for FIFE::FontBase:
Collaboration graph
[legend]

List of all members.

Public Member Functions

void setRowSpacing (int32_t spacing)
int32_t getRowSpacing () const
void setGlyphSpacing (int32_t spacing)
int32_t 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::IFont.

Definition at line 111 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::IFont.

Definition at line 121 of file fontbase.cpp.

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

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

Get the color the text was rendered in

Implements FIFE::IFont.

Definition at line 79 of file fontbase.cpp.

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

Here is the caller graph for this function:

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

Gets the spacing between letters in pixels.

Returns:
the spacing.

Implements FIFE::IFont.

Definition at line 67 of file fontbase.cpp.

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

Here is the caller graph for this function:

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

Gets the spacing between rows in pixels.

Returns:
the spacing.

Implements FIFE::IFont.

Definition at line 59 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::IFont.

Definition at line 75 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:
antaAlias true for use of antia aliasing.

Implements FIFE::IFont.

Definition at line 71 of file fontbase.cpp.

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

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

Parameters:
spacing the spacing in pixels.

Implements FIFE::IFont.

Definition at line 63 of file fontbase.cpp.

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

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

Parameters:
spacing the spacing in pixels.

Implements FIFE::IFont.

Definition at line 55 of file fontbase.cpp.


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