OSDL::Video::TwoDimensional::Text Namespace Reference

Classes

class  FixedFont
 Models fixed fonts, a category which gathers all fonts whose rendering demands little resources, but cannot be scaled, as opposed to Truetype fonts. More...
class  Font
 Models an abstract font, including its rendering style (bold, italic, etc. More...
class  TrueTypeFont
 Class allowing to manage a TrueType font. More...

Typedefs

typedef Length PointSize
 Point size, in dots per inch.
typedef Ceylan::Uint16 FontIndex
 Describes a font index, when multiple fonts are stored in the same location.
typedef Ceylan::Uint16 Height
 Describes a font pixel unsigned height.
typedef Ceylan::Sint16 SignedHeight
 Describes a font pixel signed height.
typedef Ceylan::Uint16 Width
 Describes a font pixel unsigned width.
typedef Ceylan::Sint16 SignedWidth
 Describes a font pixel signed width.
typedef Ceylan::Uint32 RenderingStyle
 Describes the rendering style of a font.
typedef Ceylan::Uint16 TextIndex
 Index designating a position in a text, starting at zero with the first character.
typedef Ceylan::Uint16 LineNumber
 Describes a line number is a multiline text.
typedef ::_TTF_Font LowLevelTTFFont
typedef Ceylan::CountedPointer
< TrueTypeFont
TrueTypeFontCountedPtr
 TrueType font counted pointer.

Enumerations

enum  HorizontalAlignment { Left, WidthCentered, Right }
 

Defines the various possible horizontal alignments.

More...
enum  VerticalAlignment { Top, HeightCentered, Bottom }
 

Defines the various possible vertical alignments.

More...

Functions

OSDL_DLL bool printBasic (const std::string &text, Surface &targetSurface, Coordinate x, Coordinate y, Pixels::ColorElement red, Pixels::ColorElement blue, Pixels::ColorElement green, Pixels::ColorElement alpha=Pixels::AlphaOpaque)
 Prints specified string on target surface, with specified color, taking as upper left corner specified coordinates.
OSDL_DLL bool printBasic (const std::string &text, Surface &targetSurface, Coordinate x, Coordinate y, Pixels::ColorDefinition colorDef)
 Prints specified string on target surface, with specified color, taking as upper left corner specified coordinates.

Variables

OSDL_DLL const Length BasicFontCharacterWidth = 8
 The character width of fixed basic font.
OSDL_DLL const Length BasicFontCharacterHeight = 8
 The character height of fixed basic font.

Typedef Documentation

Describes a font index, when multiple fonts are stored in the same location.

Definition at line 100 of file OSDLFont.h.

Describes a font pixel unsigned height.

Definition at line 105 of file OSDLFont.h.

Describes a line number is a multiline text.

Note:
The first line has for number '1' (not '0').

Definition at line 142 of file OSDLFont.h.

Definition at line 90 of file OSDLTrueTypeFont.h.

Point size, in dots per inch.

Definition at line 91 of file OSDLFont.h.

Describes the rendering style of a font.

Definition at line 123 of file OSDLFont.h.

Describes a font pixel signed height.

Definition at line 109 of file OSDLFont.h.

Describes a font pixel signed width.

Definition at line 118 of file OSDLFont.h.

Index designating a position in a text, starting at zero with the first character.

Definition at line 132 of file OSDLFont.h.

TrueType font counted pointer.

Definition at line 101 of file OSDLTrueTypeFont.h.

Describes a font pixel unsigned width.

Definition at line 114 of file OSDLFont.h.


Enumeration Type Documentation

Defines the various possible horizontal alignments.

Enumerator:
Left 
WidthCentered 
Right 

Definition at line 148 of file OSDLFont.h.

Defines the various possible vertical alignments.

Enumerator:
Top 
HeightCentered 
Bottom 

Definition at line 153 of file OSDLFont.h.


Function Documentation

bool OSDL::Video::TwoDimensional::Text::printBasic ( const std::string &  text,
Surface targetSurface,
Coordinate  x,
Coordinate  y,
Pixels::ColorDefinition  colorDef 
)

Prints specified string on target surface, with specified color, taking as upper left corner specified coordinates.

Basic 8x8 bitmap font will be used.

Not all accentuated characters are supported by the built-in font. For example, 'à', 'â', etc. are replaced by greek characters.

Note:
The printBasic methods are very lightweight, since they rely onto built-in basic fonts: no need to instanciate a FixedFont class to use them.
Exceptions:
VideoException if the operation is not supported.

Definition at line 111 of file OSDLFixedFont.cc.

References OSDL::Video::Pixels::convertColorDefinitionToRawPixelColor(), OSDL::Video::Surface::getSDLSurface(), and OSDL::Video::TwoDimensional::Text::FixedFont::SetFontSettings().

bool OSDL::Video::TwoDimensional::Text::printBasic ( const std::string &  text,
Surface targetSurface,
Coordinate  x,
Coordinate  y,
Pixels::ColorElement  red,
Pixels::ColorElement  blue,
Pixels::ColorElement  green,
Pixels::ColorElement  alpha = Pixels::AlphaOpaque 
)

Prints specified string on target surface, with specified color, taking as upper left corner specified coordinates.

Basic 8x8 bitmap font will be used.

Not all accentuated characters are supported by the built-in font. For example, 'à', 'â', etc. are replaced by greek characters.

Note:
The printBasic methods are very lightweight, since they rely onto built-in basic fonts: no need to instanciate a FixedFont class to use them.
Exceptions:
VideoException if the operation is not supported.

Definition at line 137 of file OSDLFixedFont.cc.

References OSDL::Video::Surface::getSDLSurface(), and OSDL::Video::TwoDimensional::Text::FixedFont::SetFontSettings().

Referenced by OSDL::Video::Surface::printText().


Variable Documentation

The character height of fixed basic font.

Definition at line 90 of file OSDLFixedFont.cc.

Referenced by OSDL::Video::TwoDimensional::Widget::drawDecorations().

The character width of fixed basic font.

Definition at line 87 of file OSDLFixedFont.cc.

Referenced by OSDL::Video::TwoDimensional::Widget::drawDecorations().

Generated on Mon Nov 29 14:06:32 2010 for OSDL by  doxygen 1.6.3