AgateLib.BitmapFont.BitmapFontImpl Class Reference

Provides a basic implementation for the use of non-system fonts provided as a bitmap. More...

Inheritance diagram for AgateLib.BitmapFont.BitmapFontImpl:

AgateLib.ImplementationBase.FontSurfaceImpl

List of all members.

Public Member Functions

 BitmapFontImpl (string filename, Size characterSize)
 Constructs a BitmapFontImpl, assuming the characters in the given file are all the same size, and are in their ASCII order.
 BitmapFontImpl (Surface surface, FontMetrics fontMetrics)
 Constructs a BitmapFontImpl, taking the passed surface as the source for the characters. The source rectangles for each character are passed in.
override void Dispose ()
 Disposes of the object.
override int StringDisplayWidth (string text)
 Measures the width of the text.
override int StringDisplayHeight (string text)
 Measures the height of the text.
override Size StringDisplaySize (string text)
 Measures the size of the text.
override void DrawText (int destX, int destY, string text)
 Draws the text to the screen.
override void DrawText (double destX, double destY, string text)
 Draws the text to the screen.
override void DrawText (Point destPt, string text)
 Draws the text to the screen.
override void DrawText (PointF destPt, string text)
 Draws the text to the screen.

Properties

FontMetrics FontMetrics [get]
 Gets the font metric information.
Surface Surface [get]
 Gets the surface containing the glyphs.
override Color Color [get, set]
 Overrides the base Color method to catch color changes to set them on the surface.
override int FontHeight [get]
 Returns the height of characters in the font.


Detailed Description

Provides a basic implementation for the use of non-system fonts provided as a bitmap.

To construct a bitmap font, call the appropriate static FontSurface method.


Constructor & Destructor Documentation

AgateLib.BitmapFont.BitmapFontImpl.BitmapFontImpl ( string  filename,
Size  characterSize 
)

Constructs a BitmapFontImpl, assuming the characters in the given file are all the same size, and are in their ASCII order.

Parameters:
filename 
characterSize 

AgateLib.BitmapFont.BitmapFontImpl.BitmapFontImpl ( Surface  surface,
FontMetrics  fontMetrics 
)

Constructs a BitmapFontImpl, taking the passed surface as the source for the characters. The source rectangles for each character are passed in.

Parameters:
surface Surface which contains the image data for the font glyphs.
fontMetrics FontMetrics structure which describes how characters are laid out.


Member Function Documentation

override void AgateLib.BitmapFont.BitmapFontImpl.Dispose (  )  [virtual]

Disposes of the object.

Implements AgateLib.ImplementationBase.FontSurfaceImpl.

override void AgateLib.BitmapFont.BitmapFontImpl.DrawText ( PointF  destPt,
string  text 
) [virtual]

Draws the text to the screen.

Parameters:
destPt 
text 

Implements AgateLib.ImplementationBase.FontSurfaceImpl.

override void AgateLib.BitmapFont.BitmapFontImpl.DrawText ( Point  destPt,
string  text 
) [virtual]

Draws the text to the screen.

Parameters:
destPt 
text 

Implements AgateLib.ImplementationBase.FontSurfaceImpl.

override void AgateLib.BitmapFont.BitmapFontImpl.DrawText ( double  destX,
double  destY,
string  text 
) [virtual]

Draws the text to the screen.

Parameters:
destX 
destY 
text 

Implements AgateLib.ImplementationBase.FontSurfaceImpl.

override void AgateLib.BitmapFont.BitmapFontImpl.DrawText ( int  destX,
int  destY,
string  text 
) [virtual]

Draws the text to the screen.

Parameters:
destX 
destY 
text 

Implements AgateLib.ImplementationBase.FontSurfaceImpl.

override int AgateLib.BitmapFont.BitmapFontImpl.StringDisplayHeight ( string  text  )  [virtual]

Measures the height of the text.

Parameters:
text 
Returns:

Implements AgateLib.ImplementationBase.FontSurfaceImpl.

override Size AgateLib.BitmapFont.BitmapFontImpl.StringDisplaySize ( string  text  )  [virtual]

Measures the size of the text.

Parameters:
text 
Returns:

Implements AgateLib.ImplementationBase.FontSurfaceImpl.

override int AgateLib.BitmapFont.BitmapFontImpl.StringDisplayWidth ( string  text  )  [virtual]

Measures the width of the text.

Parameters:
text 
Returns:

Implements AgateLib.ImplementationBase.FontSurfaceImpl.


Property Documentation

override Color AgateLib.BitmapFont.BitmapFontImpl.Color [get, set]

Overrides the base Color method to catch color changes to set them on the surface.

Reimplemented from AgateLib.ImplementationBase.FontSurfaceImpl.

override int AgateLib.BitmapFont.BitmapFontImpl.FontHeight [get]

Returns the height of characters in the font.

Reimplemented from AgateLib.ImplementationBase.FontSurfaceImpl.

FontMetrics AgateLib.BitmapFont.BitmapFontImpl.FontMetrics [get]

Gets the font metric information.

Returns:

Surface AgateLib.BitmapFont.BitmapFontImpl.Surface [get]

Gets the surface containing the glyphs.

Returns:


The documentation for this class was generated from the following file:
AgateLib
Awesome Game and Tool Engine Library
SourceForge.net Logo