|
|
|
|
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>
Collaboration diagram for NL3D::CFontManager:
[legend]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...
|
NLMISC::CSmartPtr<CMaterial> | getFontMaterial (CFontDescriptor desc) |
| 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...
|
std::string | getCacheInformation () const |
| return a string given information about the cache. More...
|
Private Attributes |
uint32 | _MemSize |
uint32 | _MaxMemory |
uint32 | _NbChar |
mapFontDec | _Letters |
std::list<NLMISC::CSmartPtr<
CMaterial> > | _MaterialFontList |
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(s):
-
Stephane Coutelas , Nevrax France
-
Date:
-
2000
Definition at line 76 of file font_manager.h.
Constructor & Destructor Documentation
NL3D::CFontManager::CFontManager (
|
) [inline]
|
|
Member Function Documentation
string NL3D::CFontManager::getCacheInformation (
|
) const
|
|
|
return a string given information about the cache.
Definition at line 276 of file font_manager.cpp. |
|
manages fonts in memory using CSmartPtr.
-
Parameters:
-
-
Returns:
-
CSmartPtr to a font texture
Definition at line 49 of file font_manager.cpp. |
uint32 NL3D::CFontManager::getMaxMemory (
|
) const [inline]
|
|
|
gives maximum memory allowed.
-
Returns:
-
maximum memory
Definition at line 108 of file font_manager.h. |
void NL3D::CFontManager::setMaxMemory (
|
uint32 mem ) [inline]
|
|
|
define maximum memory allowed.
-
Parameters:
-
Definition at line 101 of file font_manager.h. |
Member Data Documentation
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:
|
|