# Home    # nevrax.com   
Nevrax
Nevrax.org
#News
#Mailing-list
#Documentation
#CVS
#Bugs
#License
Docs
 
Documentation  
Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages   Search  

NL3D::CTextureFont Class Reference

CTextureFont. More...

#include <texture_font.h>

Inheritance diagram for NL3D::CTextureFont:

NL3D::ITexture NLMISC::CBitmap NLMISC::CRefCount NLMISC::IStreamable NLMISC::IClassable List of all members.

Public Methods

 CTextureFont ()
 Default constructor. More...

virtual ~CTextureFont ()
void doGenerate ()
 Generate the texture pixels. More...

SLetterInfogetLetterInfo (SLetterKey &k)
void dumpTextureFont (const char *filename)
virtual void serial (NLMISC::IStream &f) throw (NLMISC::EStream)
 Todo: serialize a font texture. More...

 NLMISC_DECLARE_CLASS (CTextureFont)

Private Methods

void rebuildLetter (sint cat, sint x, sint y)

Private Attributes

std::map< uint32, SLetterInfo * > Accel
std::vector< SLetterInfoLetters [TEXTUREFONT_NBCATEGORY]
SLetterInfoFront [TEXTUREFONT_NBCATEGORY]
SLetterInfoBack [TEXTUREFONT_NBCATEGORY]

Detailed Description

CTextureFont.

Definition at line 44 of file texture_font.h.


Constructor & Destructor Documentation

NL3D::CTextureFont::CTextureFont  
 

Default constructor.

Definition at line 88 of file texture_font.cpp.

References NL3D::ITexture::Alpha, Back, NL3D::Categories, Front, NLMISC::CBitmap::getPixels, Letters, NL3D::NbLine, NLMISC::CBitmap::resize, NL3D::ITexture::setFilterMode, NL3D::ITexture::setReleasable, NL3D::ITexture::setUploadFormat, NL3D::ITexture::setWrapS, NL3D::ITexture::setWrapT, TEXTUREFONT_NBCATEGORY, NL3D::TextureSizeX, and NL3D::TextureSizeY.

NL3D::CTextureFont::~CTextureFont   [virtual]
 

Definition at line 148 of file texture_font.cpp.


Member Function Documentation

void NL3D::CTextureFont::doGenerate   [virtual]
 

Generate the texture pixels.

If the invalidate rect list is empty, generate() must rebuild all the texture. If the invalidate rect list is not empty, generate() rebuilds only the invalidate rectangles in the list.

See also:
isAllInvalidated(), touch(), touched(), touchRect(), clearTouched(), _ListInvalidRect, generate() , getReleasable(), setReleasable()

Implements NL3D::ITexture.

Definition at line 234 of file texture_font.cpp.

References NL3D::ITexture::_ListInvalidRect, NL3D::Categories, NL3D::NbLine, nlassert, rebuildLetter, TEXTUREFONT_NBCATEGORY, NL3D::TextureSizeX, x, and y.

void NL3D::CTextureFont::dumpTextureFont const char *    filename
 

Definition at line 154 of file texture_font.cpp.

References NLMISC::CBitmap::CBitmap, NLMISC::CBitmap::getPixels, src, NL3D::TextureSizeX, and NL3D::TextureSizeY.

CTextureFont::SLetterInfo * NL3D::CTextureFont::getLetterInfo SLetterKey   k
 

Definition at line 294 of file texture_font.cpp.

References Accel, NL3D::CTextureFont::SLetterInfo::AdvX, Back, NL3D::CTextureFont::SLetterInfo::Cat, NL3D::Categories, NL3D::CTextureFont::SLetterInfo::Char, NL3D::CTextureFont::SLetterInfo::CharHeight, NL3D::CTextureFont::SLetterInfo::CharWidth, NL3D::CTextureFont::SLetterInfo::FontGenerator, Front, height, index, NL3D::CTextureFont::SLetterInfo::Left, Letters, NL3D::NbLine, NL3D::CTextureFont::SLetterInfo::Next, nlassert, NL3D::CTextureFont::SLetterInfo::Prev, r, NL3D::CTextureFont::SLetterInfo::Size, TEXTUREFONT_NBCATEGORY, NL3D::TextureSizeX, NL3D::CTextureFont::SLetterInfo::Top, NL3D::ITexture::touchRect, width, x, and y.

NL3D::CTextureFont::NLMISC_DECLARE_CLASS CTextureFont   
 

void NL3D::CTextureFont::rebuildLetter sint    cat,
sint    x,
sint    y
[private]
 

Definition at line 175 of file texture_font.cpp.

References NLMISC::CBitmap::_Data, NL3D::Categories, index, Letters, NL3D::NbLine, NL3D::TextureSizeX, NL3D::TextureSizeY, x, and y.

Referenced by doGenerate.

virtual void NL3D::CTextureFont::serial NLMISC::IStream   f throw (NLMISC::EStream) [inline, virtual]
 

Todo: serialize a font texture.

Reimplemented from NL3D::ITexture.

Definition at line 112 of file texture_font.h.

References nlstop.


Member Data Documentation

std::map<uint32, SLetterInfo*> NL3D::CTextureFont::Accel [private]
 

Definition at line 103 of file texture_font.h.

Referenced by getLetterInfo.

SLetterInfo * NL3D::CTextureFont::Back[TEXTUREFONT_NBCATEGORY] [private]
 

Definition at line 106 of file texture_font.h.

Referenced by CTextureFont, and getLetterInfo.

SLetterInfo* NL3D::CTextureFont::Front[TEXTUREFONT_NBCATEGORY] [private]
 

Definition at line 106 of file texture_font.h.

Referenced by CTextureFont, and getLetterInfo.

std::vector<SLetterInfo> NL3D::CTextureFont::Letters[TEXTUREFONT_NBCATEGORY] [private]
 

Definition at line 105 of file texture_font.h.

Referenced by CTextureFont, getLetterInfo, and rebuildLetter.


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