# 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

Inheritance graph
[legend]
Collaboration diagram for NL3D::CTextureFont:

Collaboration graph
[legend]
List of all members.

Public Methods

 CTextureFont ()
 Default constructor. More...

 CTextureFont (const CFontDescriptor& desc)
 Default constructor. More...

 CTextureFont (CFontGenerator *fg, ucchar c, uint32 size)
 constructor. More...

uint32 getCharWidth () const
uint32 getCharHeight () const
uint32 getWidth () const
uint32 getHeight () const
CFontDescriptor getDescriptor () const
 return the descriptor of this letter /return CFontDescriptor letter descriptor. More...

void doGenerate ()
 Generate the texture pixels. More...

virtual void serial (NLMISC::IStream &f) throw (NLMISC::EStream)
 Todo: serialize a font texture. More...

 NLMISC_DECLARE_CLASS (CTextureFont)

Public Attributes

ucchar Char
 the unicode character. More...

uint32 GlyphIndex
 number of the character in the this font. More...

sint32 Top
 Distance between origin and top of the texture. More...

sint32 Left
 Distance between origin and left of the texture. More...

sint32 AdvX
 Advance to the next caracter. More...


Private Attributes

uint32 _CharWidth
uint32 _CharHeight
uint32 _Width
uint32 _Height
uint32 _Size
CFontGenerator_FontGen

Detailed Description

CTextureFont.

Rq : _Width and _Height are duplicated from CBitmap because the texture can be released by the driver, which sets these values to zero. But these values are necessary to compute strings.

Author(s):
Stephane Coutelas , Nevrax France
Date:
2000

Definition at line 50 of file texture_font.h.


Constructor & Destructor Documentation

NL3D::CTextureFont::CTextureFont ( ) [inline]
 

Default constructor.

Definition at line 64 of file texture_font.h.

NL3D::CTextureFont::CTextureFont ( const CFontDescriptor & desc ) [inline]
 

Default constructor.

Definition at line 86 of file texture_font.h.

NL3D::CTextureFont::CTextureFont ( CFontGenerator * fg,
ucchar c,
uint32 size ) [inline]
 

constructor.

Definition at line 106 of file texture_font.h.


Member Function Documentation

NL3D::CTextureFont::NLMISC_DECLARE_CLASS ( CTextureFont )
 

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()

Reimplemented from NL3D::ITexture.

Definition at line 41 of file texture_font.cpp.

uint32 NL3D::CTextureFont::getCharHeight ( ) const [inline]
 

Definition at line 124 of file texture_font.h.

uint32 NL3D::CTextureFont::getCharWidth ( ) const [inline]
 

Definition at line 123 of file texture_font.h.

CFontDescriptor NL3D::CTextureFont::getDescriptor ( ) const [inline]
 

return the descriptor of this letter /return CFontDescriptor letter descriptor.

Definition at line 132 of file texture_font.h.

uint32 NL3D::CTextureFont::getHeight ( ) const [inline]
 

Definition at line 127 of file texture_font.h.

uint32 NL3D::CTextureFont::getWidth ( ) const [inline]
 

Definition at line 126 of file texture_font.h.

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

Todo: serialize a font texture.

Reimplemented from NLMISC::IStreamable.

Definition at line 153 of file texture_font.h.


Member Data Documentation

sint32 NL3D::CTextureFont::AdvX
 

Advance to the next caracter.

Definition at line 149 of file texture_font.h.

ucchar NL3D::CTextureFont::Char
 

the unicode character.

Definition at line 141 of file texture_font.h.

uint32 NL3D::CTextureFont::GlyphIndex
 

number of the character in the this font.

Definition at line 143 of file texture_font.h.

sint32 NL3D::CTextureFont::Left
 

Distance between origin and left of the texture.

Definition at line 147 of file texture_font.h.

sint32 NL3D::CTextureFont::Top
 

Distance between origin and top of the texture.

Definition at line 145 of file texture_font.h.

uint32 NL3D::CTextureFont::_CharHeight [private]
 

Definition at line 53 of file texture_font.h.

uint32 NL3D::CTextureFont::_CharWidth [private]
 

Definition at line 52 of file texture_font.h.

CFontGenerator * NL3D::CTextureFont::_FontGen [private]
 

Definition at line 58 of file texture_font.h.

uint32 NL3D::CTextureFont::_Height [private]
 

Reimplemented from NLMISC::CBitmap.

Definition at line 55 of file texture_font.h.

uint32 NL3D::CTextureFont::_Size [private]
 

Definition at line 57 of file texture_font.h.

uint32 NL3D::CTextureFont::_Width [private]
 

Reimplemented from NLMISC::CBitmap.

Definition at line 54 of file texture_font.h.


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