|
|
|
|
Documentation |
|
Main Page Namespace List Class Hierarchy Alphabetical List Compound List File List Namespace Members Compound Members File Members Related Pages Search
NL3D::CFontManager Class ReferenceFont manager The font manager manages CMaterial pointers through a list of CSmartPtr.
More...
#include <font_manager.h>
List of all members.
Public Methods |
| CFontManager () |
| Default constructor. More...
|
void | setMaxMemory (uint32 mem) |
| define maximum memory allowed. More...
|
uint32 | getMaxMemory () const |
| gives maximum memory allowed. More...
|
CMaterial * | getFontMaterial () |
| manages fonts in memory using CSmartPtr. More...
|
void | computeString (const std::string &s, CFontGenerator *fontGen, const NLMISC::CRGBA &color, uint32 fontSize, IDriver *driver, CComputedString &output, bool keep800x600Ratio=true) |
| Compute primitive blocks and materials of each character of the string. More...
|
void | computeString (const ucstring &s, CFontGenerator *fontGen, const NLMISC::CRGBA &color, uint32 fontSize, IDriver *driver, CComputedString &output, bool keep800x600Ratio=true) |
| Same as computeString but works with a unicode string (ucstring). More...
|
void | computeStringInfo (const ucstring &s, CFontGenerator *fontGen, const NLMISC::CRGBA &color, uint32 fontSize, IDriver *driver, CComputedString &output, bool keep800x600Ratio=true) |
| Same as computeString but do not make vertex buffers and primitives. More...
|
std::string | getCacheInformation () const |
| return a string given information about the cache. More...
|
void | dumpCache (const char *filename) |
Private Attributes |
uint32 | _MemSize |
uint32 | _MaxMemory |
uint32 | _NbChar |
CMaterial * | _MatFont |
CTextureFont * | _TexFont |
Detailed Description
Font manager The font manager manages CMaterial pointers through a list of CSmartPtr.
When the user asks for the texture font representing a character(font/size), it generates and stores this pointer in the list. If this character has already been generated, and lies in the list, it increments its reference count. If the memory used by generated textures exceeds the max memory, then the useless character/pointer is erased from the list. Max memory is set to 0 by default, so this value should be set to non-zero before generating textures to prevent immediate memory deletion. -
Author:
-
Stephane Coutelas , Nevrax France
-
Date:
-
2000
Definition at line 62 of file font_manager.h.
Constructor & Destructor Documentation
NL3D::CFontManager::CFontManager |
( |
|
) |
[inline] |
|
Member Function Documentation
void NL3D::CFontManager::dumpCache |
( |
const char * |
filename |
) |
[inline] |
|
string NL3D::CFontManager::getCacheInformation |
( |
|
) |
const |
|
CMaterial * NL3D::CFontManager::getFontMaterial |
( |
|
) |
[inline] |
|
uint32 NL3D::CFontManager::getMaxMemory |
( |
|
) |
const [inline] |
|
void NL3D::CFontManager::setMaxMemory |
( |
uint32 |
mem |
) |
[inline] |
|
Member Data Documentation
CMaterial* NL3D::CFontManager::_MatFont [private]
|
|
uint32 NL3D::CFontManager::_MaxMemory [private]
|
|
uint32 NL3D::CFontManager::_MemSize [private]
|
|
uint32 NL3D::CFontManager::_NbChar [private]
|
|
The documentation for this class was generated from the following files:
|
|