Guiliani  Version 2.6 revision 7293 (documentation build 12)
CFntWrapGlyphLibDAVE Class Reference

Glyphlib font wrapper specialization using DAVE-API. More...

#include <FntWrapGlyphLibDave.h>

Inheritance diagram for CFntWrapGlyphLibDAVE:

Static Public Member Functions

static eC_Bool CreateInstance (const eC_UInt &uiGlyphCacheInitialSize=32, const eC_Bool &bGlyphCacheAutoResize=true, const eC_UInt &uiGlyphCacheResizeBy=10)
 
- Static Public Member Functions inherited from CFntWrapGlyphLib
static eC_Bool CreateInstance ()
 
- Static Public Member Functions inherited from CFntWrap
static void DeleteInstance ()
 

Protected Member Functions

virtual eC_Int GetAscender () const
 
virtual eC_Int GetDescender () const
 
virtual void GetGlyphMetrics (const eC_Char cChar, GlyphMetrics_t &kMetrics)
 
virtual eC_Int GetInternalLeading () const
 
virtual void LoadFont (const FontResource_t &eFontID)
 
virtual void RenderGlyphToScreen (const eC_Value &vX1, const eC_Value &vY1, CGUIImageData &kGlyphImage)
 
virtual void SetFont (const FontResource_t &eID)
 
virtual eC_Bool SetNOFFonts (const eC_UInt uiNOFFonts)
 
virtual void UnloadFont (const FontResource_t &eFontID)
 
- Protected Member Functions inherited from CFntWrapGlyphLib
virtual eC_Int GetAscender () const
 
virtual eC_Int GetDescender () const
 
virtual void GetGlyphMetrics (const eC_Char cChar, GlyphMetrics_t &kMetrics)
 
virtual eC_Int GetInternalLeading () const
 
virtual void RenderGlyphToScreen (const eC_Value &vX1, const eC_Value &vY1, CGUIImageData &kGlyphImage)
 
virtual void RenderTextInternal (const eC_String *lpString, const TextOperation_t &eOperation, const eC_Value &vX1, const eC_Value &vY1, eC_Value &vWidth, eC_Value &vHeight, eC_Value vWidthMax, eC_UInt &uiNumFittingChars)
 
eC_Bool SetNOFFonts (const eC_UInt uiNOFFonts)
 
void Text (const eC_Value &vX1, const eC_Value &vY1, const eC_String *const lpString)
 
- Protected Member Functions inherited from CFntWrap
 CFntWrap ()
 Constructor.
 
virtual ~CFntWrap ()
 Destructor.
 
void * GetWorkingMemory (const eC_UInt &uiSize)
 
void ReleaseWorkingMemory ()
 release working memory
 

Additional Inherited Members

- Public Types inherited from CFntWrap
enum  GUIFont_t { FNT_NORMAL = 0 , FNT_ITALIC = 1 , FNT_UNDERLINED = 2 , FNT_BOLD = 4 }
 
enum  TextOperation_t { RENDER_TEXT , GET_REQUIRED_SPACE }
 
- Public Member Functions inherited from CFntWrapGlyphLib
void LoadFont (const FontResource_t &eFontID)
 
void RequiredSpace (const eC_String *const pkText, eC_Value &vWidth, eC_Value &vHeight)
 
void SetFont (const FontResource_t &eID)
 
void UnloadFont (const FontResource_t &eFontID)
 
- Public Member Functions inherited from CFntWrap
void ChangeFont (const FontResource_t &eFontID, const eC_String &pcPath, const eC_UInt uiFontSize, const GUIFont_t &eFontStyle)
 
virtual void FittingNumChars (const eC_String *const pkText, eC_Value vWidthMax, eC_UInt &uiNumChars, const eC_Bool &bStartAtEnd=false)
 
virtual eC_Int GetAscender () const
 
virtual eC_Int GetDescender () const
 
virtual void GetGlyphMetrics (const eC_Char cChar, GlyphMetrics_t &kMetrics)
 
virtual eC_Int GetInternalLeading () const
 
virtual eC_UInt GetNOFFonts ()
 
CGUICommonEnums::Rotation_t GetRotation () const
 
virtual eC_Value GetTextXPosAdjustment (const CGUIText::HorAligned_t eHorAlignment)
 
virtual eC_Value GetTextYPosAdjustment (const CGUIText::VerAligned_t eVerAlignment)
 
virtual void LoadFont (const FontResource_t &eFontID)
 
virtual void RequiredSpace (const eC_String *const pkText, eC_Value &vWidth, eC_Value &vHeight)=0
 
virtual void SetFont (const FontResource_t &eID)
 
virtual void SetFontSpacing (const eC_Float &fSpacing)
 
virtual eC_Bool SetNOFFonts (const eC_UInt uiNOFFonts)
 
void SetRotation (const CGUICommonEnums::Rotation_t &eRotation)
 
virtual void Text (const eC_Value &vX1, const eC_Value &vY1, const eC_String *const lpString)=0
 
virtual void UnloadFont (const FontResource_t &eFontID)
 
- Protected Attributes inherited from CFntWrapGlyphLib
eC_TArray< FontEntry_sm_kFontsHandles
 handles of all loaded fonts
 
eC_UInt m_uiCurrentFontIndex
 the currently used font-index
 
- Protected Attributes inherited from CFntWrap
FontResource_t m_eCurFont
 Current font id.
 
CGUICommonEnums::Rotation_t m_eRotation
 Rotation.
 
eC_UInt m_uiNOFFonts
 Total number of fonts.
 
eC_Value m_vSpacing
 Font spacing, i.e the space between letters.
 

Detailed Description

Glyphlib font wrapper specialization using DAVE-API.

This is the cached GlyphLib implementation of the font wrapper for DAVE. It implements the text rendering using DAVE. For details see base class.

this version will use a glyph-cache for every font which is currently requested. if the font is compressed it will be uncompressed before storing the glyph into the cache.

Member Function Documentation

◆ CreateInstance()

static eC_Bool CFntWrapGlyphLibDAVE::CreateInstance ( const eC_UInt &  uiGlyphCacheInitialSize = 32,
const eC_Bool &  bGlyphCacheAutoResize = true,
const eC_UInt &  uiGlyphCacheResizeBy = 10 
)
static

Create a FntWrap-GlyphLib object. It should be created in implementation after creation of GfxWrap.

Parameters
uiGlyphCacheInitialSizeinitial size for glyph-cache
bGlyphCacheAutoResizeif true the cache will be resized if necessary
uiGlyphCacheResizeByamount of glyph to be resized
Returns
True if it is successfully created, False otherwise.

◆ GetAscender()

virtual eC_Int CFntWrapGlyphLibDAVE::GetAscender ( ) const
protectedvirtual

Returns the currently set font's ascender-metric. If the ascender is not supported by a given Font-Wrapper, this returns 0.

Returns
ascender in pixels

Reimplemented from CFntWrapGlyphLib.

◆ GetDescender()

virtual eC_Int CFntWrapGlyphLibDAVE::GetDescender ( ) const
protectedvirtual

Returns the currently set font's descender-metric. If the descender is not supported by a given Font-Wrapper, this returns 0.

Returns
descender in pixels

Reimplemented from CFntWrapGlyphLib.

◆ GetGlyphMetrics()

virtual void CFntWrapGlyphLibDAVE::GetGlyphMetrics ( const eC_Char  cChar,
GlyphMetrics_t kMetrics 
)
protectedvirtual

Get the metrics of a glyph for a specific character

Parameters
cCharcharacter
kMetricsmetrics of glyph

Reimplemented from CFntWrapGlyphLib.

◆ GetInternalLeading()

virtual eC_Int CFntWrapGlyphLibDAVE::GetInternalLeading ( ) const
protectedvirtual

Returns the currently set font's internal leading. If the internal leading is not supported by a given Font-Wrapper, this returns 0.

Returns
internal leading in pixels

Reimplemented from CFntWrapGlyphLib.

◆ LoadFont()

virtual void CFntWrapGlyphLibDAVE::LoadFont ( const FontResource_t eFontID)
protectedvirtual

Loads a font identified by eFontID into an array of fonts at position eFontID. If the font already exists, it's not loaded again. Should only be called by a FntWrapper.

Parameters
eFontIDid (and hence index) of the font. False else.

Reimplemented from CFntWrap.

◆ RenderGlyphToScreen()

virtual void CFntWrapGlyphLibDAVE::RenderGlyphToScreen ( const eC_Value &  vX1,
const eC_Value &  vY1,
CGUIImageData kGlyphImage 
)
protectedvirtual

Renders a glyph to the screen. This function takes the 8 bit alpha image provided by GlyphLib adds color and blits it to the screen.

Parameters
vX1The x coordinate where the glyph image is rendered.
vY1The y coordinate where the glyph image is rendered.
kGlyphImageThe glyph image containing a 8 bit alpha image of the glyph.

Reimplemented from CFntWrapGlyphLib.

◆ SetFont()

virtual void CFntWrapGlyphLibDAVE::SetFont ( const FontResource_t eID)
protectedvirtual

Sets a new font for the application.

Parameters
eIDid (and hence index) of the font.

Reimplemented from CFntWrap.

◆ SetNOFFonts()

virtual eC_Bool CFntWrapGlyphLibDAVE::SetNOFFonts ( const eC_UInt  uiNOFFonts)
protectedvirtual

Sets the total number of fonts. This is called internally by the ResourceManager when dynamically allocated font resources require the total number of fonts to be raised. Derived classes will have to override this method and resize their internal font-storage structures according to the new number of fonts which will have to be stored.

Parameters
uiNOFFontsThe number of fonts
Returns
True if internal storage has been successfully adapted to support the requested number of fonts. False otherwise.

Reimplemented from CFntWrap.

◆ UnloadFont()

virtual void CFntWrapGlyphLibDAVE::UnloadFont ( const FontResource_t eFontID)
protectedvirtual

Unloading is not supported by GlyphLib

Parameters
eFontIDFontID to unload

Reimplemented from CFntWrap.


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