fs::ras::BmfFnt_t Class Reference

#include <fsBmfFnt.h>

Collaboration diagram for fs::ras::BmfFnt_t:

Collaboration graph
[legend]
List of all members.

Detailed Description

BMF font loader / renderer.

After a BMF font is loaded, a text string using the font can be rendered into the destination bitmap surface. Many free BMF fonts can be found here. There is also BMF format specification.

fs_ras_BmfFnt_t_01.gif

Todo:
Clipping, RGB-888 support, Consider splitting.
Examples:

_tests/fsBmfFnt/main.cpp.

Definition at line 33 of file fsBmfFnt.h.

Public Member Functions

 BmfFnt_t (const char *pszFile)
 Loads a BMF font using the given filename.
 ~BmfFnt_t ()
bool IsValid () const
 Checks the internal state / correct construction.
void Print (int nX, int nY, const char *pszText, PxFmt8888_t *pDst, int nDstW, int nDstH, int nClipX1=-1, int nClipY1=-1, int nClipX2=-1, int nClipY2=-1) const
 Render a text string into the destination bitmap surface.

Private Member Functions

 BmfFnt_t ()
 No def ctor.
 BmfFnt_t (const BmfFnt_t &)
 No copy.
BmfFnt_toperator= (const BmfFnt_t &)
 No assignment.

Private Attributes

void * m_pImpl
 The PIPML idiom is used.

Classes

struct  PxFmt8888_t
 RGBA-8888 destination bitmap surface pixel format. More...
struct  PxFmt888_t
 RGB-888 destination bitmap surface pixel format. More...


Constructor & Destructor Documentation

BmfFnt_t::BmfFnt_t ( const char *  pszFile  )  [explicit]

Loads a BMF font using the given filename.

Definition at line 318 of file fsBmfFnt.cpp.

References FS_ASSERT_MSG, and m_pImpl.

BmfFnt_t::~BmfFnt_t (  ) 

Definition at line 324 of file fsBmfFnt.cpp.

References FS_ASSERT_MSG, and m_pImpl.

fs::ras::BmfFnt_t::BmfFnt_t (  )  [private]

No def ctor.

fs::ras::BmfFnt_t::BmfFnt_t ( const BmfFnt_t  )  [private]

No copy.


Member Function Documentation

bool BmfFnt_t::IsValid (  )  const

Checks the internal state / correct construction.

Examples:
_tests/fsBmfFnt/main.cpp.

Definition at line 330 of file fsBmfFnt.cpp.

References FS_ASSERT_MSG, and m_pImpl.

BmfFnt_t& fs::ras::BmfFnt_t::operator= ( const BmfFnt_t  )  [private]

No assignment.

void BmfFnt_t::Print ( int  nX,
int  nY,
const char *  pszText,
PxFmt8888_t pDst,
int  nDstW,
int  nDstH,
int  nClipX1 = -1,
int  nClipY1 = -1,
int  nClipX2 = -1,
int  nClipY2 = -1 
) const

Render a text string into the destination bitmap surface.

Examples:
_tests/fsBmfFnt/main.cpp.

Definition at line 336 of file fsBmfFnt.cpp.

References FS_ASSERT_MSG, and m_pImpl.


Member Data Documentation

void* fs::ras::BmfFnt_t::m_pImpl [private]

The PIPML idiom is used.

Definition at line 59 of file fsBmfFnt.h.


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

FipS' Code (Thu Feb 15 22:43:52 2007) - (c) Filip STOKLAS (FipS) - [ www ] [ Guest Book ]