FontCache is the base-class for glyph-cache. More...
#include <FontCache.h>

Classes | |
| struct | CachedChar_t |
| struct for holding the unicode and a pointer to the related info-block More... | |
| struct | CachedCharInfo_t |
Public Member Functions | |
| CFontCache (const FontResource_t &eFontID, const eC_UInt &uiInitialCacheSize, const eC_Bool &bAutoResize, const eC_UInt &uiResizeBy) | |
| virtual | ~CFontCache () |
| eC_Int | GetAscender () const |
| CachedChar_t | GetChar (const eC_UInt &uiUnicode) |
| eC_Int | GetDescender () const |
| void * | GetFace () |
| eC_Int | GetHeight () const |
| eC_Int | GetInternalLeading () const |
Protected Member Functions | |
| CFontCache (const CFontCache &kSource) | |
| virtual CachedChar_t | AddChar (const eC_UInt &uiUnicode, const eC_UInt &uiPos)=0 |
| eC_Int | FindChar (const eC_UInt &uiUnicode) |
| eC_UInt | FindLowestTimestampPos () |
| CFontCache & | operator= (const CFontCache &kSource) |
| virtual void | RemoveChar (const eC_UInt &uiPos) |
| void | Sort () |
| void | Swap (CachedChar_t *pPosA, CachedChar_t *pPosB) |
Protected Attributes | |
| eC_TArray< CachedChar_t > | m_asCache |
| The dynamic cache array. | |
| eC_Bool | m_bArrayNeedsSorting |
| sorting needed after modification | |
| eC_Bool | m_bAutoResize |
| auto-resize | |
| eC_Bool | m_bUseTimeStamp |
| timestamp | |
| FontResource_t | m_eFontID |
| loaded font | |
| eC_Int | m_iAscender |
| ascender | |
| eC_Int | m_iDescender |
| descender | |
| eC_Int | m_iHeight |
| height of font | |
| eC_Int | m_iInternalLeading |
| internal leading | |
| void * | m_pkFace |
| face of font | |
| eC_UInt | m_uiNextGlyphIndex |
| index of next glyph | |
| eC_UInt | m_uiResizeBy |
| resize by amount | |
| eC_UInt | m_uiTimer |
| current timer | |
FontCache is the base-class for glyph-cache.
It stores the cache information for one Font.
| CFontCache::CFontCache | ( | const FontResource_t & | eFontID, |
| const eC_UInt & | uiInitialCacheSize, | ||
| const eC_Bool & | bAutoResize, | ||
| const eC_UInt & | uiResizeBy | ||
| ) |
Constructor
| eFontID | ID of selected font. |
| uiInitialCacheSize | initial number of simultaneously cached characters. If parameter equals zero the cache will automatically be resized to be large enough to contain all required characters. |
| bAutoResize | if true the cache gets resized if not big enough to hold new entries |
| uiResizeBy | number of elements which are added on resize |
|
virtual |
Destructor
|
protected |
Copy-constructor. Dummy implementation to avoid unintended use of compiler-generated default
| kSource |
|
protectedpure virtual |
Adds a character to the cache array and sorts array afterwards.
| uiUnicode | Unicode to add to array. |
| uiPos | Position in array where the character should be added. |
Implemented in CFontCacheFreeType, and CFontCacheGlyphLib.
|
protected |
Searches for a character inside the cache array by using divide and conquer.
| uiUnicode | Character to search for. |
|
protected |
Searches the list for the lowest timestamp and return that position.
|
inline |
Returns the ascender of the current font.
| CachedChar_t CFontCache::GetChar | ( | const eC_UInt & | uiUnicode | ) |
This method returns a struct with the wanted character's information. It adds a character to the cache array if it does not exist.
| uiUnicode | Unicode of wanted character. |
|
inline |
Returns the descender of the current font.
|
inline |
get internal face from font
|
inline |
Returns the height of current font.
|
inline |
Returns the internal leading of the current font.
|
protected |
Operator= method. Dummy implementation to avoid unintended use of compiler-generated default
| kSource |
|
protectedvirtual |
Removes a character from array.
| uiPos | Position of the character to remove. |
|
protected |
Sorts the cache list by unicode in ascending order using bubble sort algorithm.
|
protected |
Swaps two given values.
| pPosA | Pointer of the first value. |
| pPosB | Pointer of the second value. |