Kodi Documentation  18.0
Kodi is an open source media player and entertainment hub.
CGUIFontTTFDX Class Reference

#include <GUIFontTTFDX.h>

Inheritance diagram for CGUIFontTTFDX:
CGUIFontTTFBase ID3DResource

Public Member Functions

 CGUIFontTTFDX (const std::string &strFileName)
 
virtual ~CGUIFontTTFDX (void)
 
bool FirstBegin () override
 
void LastEnd () override
 
CVertexBuffer CreateVertexBuffer (const std::vector< SVertex > &vertices) const override
 
void DestroyVertexBuffer (CVertexBuffer &bufferHandle) const override
 
void OnDestroyDevice (bool fatal) override
 
void OnCreateDevice () override
 
- Public Member Functions inherited from CGUIFontTTFBase
 CGUIFontTTFBase (const std::string &strFileName)
 
virtual ~CGUIFontTTFBase (void)
 
void Clear ()
 
bool Load (const std::string &strFilename, float height=20.0f, float aspect=1.0f, float lineSpacing=1.0f, bool border=false)
 
void Begin ()
 
void End ()
 
const std::string & GetFileName () const
 
- Public Member Functions inherited from ID3DResource
virtual ~ID3DResource ()
 

Static Public Member Functions

static void CreateStaticIndexBuffer (void)
 
static void DestroyStaticIndexBuffer (void)
 

Protected Member Functions

CBaseTextureReallocTexture (unsigned int &newHeight) override
 
bool CopyCharToTexture (FT_BitmapGlyph bitGlyph, unsigned int x1, unsigned int y1, unsigned int x2, unsigned int y2) override
 
void DeleteHardwareTexture () override
 
- Protected Member Functions inherited from CGUIFontTTFBase
void AddReference ()
 
void RemoveReference ()
 
float GetTextWidthInternal (vecText::const_iterator start, vecText::const_iterator end)
 
float GetCharWidthInternal (character_t ch)
 
float GetTextHeight (float lineSpacing, int numLines) const
 
float GetTextBaseLine () const
 
float GetLineHeight (float lineSpacing) const
 
float GetFontHeight () const
 
void DrawTextInternal (float x, float y, const std::vector< UTILS::Color > &colors, const vecText &text, uint32_t alignment, float maxPixelWidth, bool scrolling)
 
CharacterGetCharacter (character_t letter)
 
bool CacheCharacter (wchar_t letter, uint32_t style, Character *ch)
 
void RenderCharacter (float posX, float posY, const Character *ch, UTILS::Color color, bool roundX, std::vector< SVertex > &vertices)
 
void ClearCharacterCache ()
 
void SetGlyphStrength (FT_GlyphSlot slot, int glyphStrength)
 
unsigned int GetTextureLineHeight () const
 the height of each line in the texture. Accounts for spacing between lines to avoid characters overlapping. More...
 
- Protected Member Functions inherited from ID3DResource
void Register ()
 
void Unregister ()
 

Additional Inherited Members

- Static Protected Member Functions inherited from CGUIFontTTFBase
static void ObliqueGlyph (FT_GlyphSlot slot)
 
- Protected Attributes inherited from CGUIFontTTFBase
float m_height
 
std::string m_strFilename
 
CBaseTexturem_texture
 
unsigned int m_textureWidth
 
unsigned int m_textureHeight
 
int m_posX
 
int m_posY
 
UTILS::Color m_color
 
Characterm_char
 
Characterm_charquick [LOOKUPTABLE_SIZE]
 
int m_maxChars
 
int m_numChars
 
float m_ellipsesWidth
 
unsigned int m_cellBaseLine
 
unsigned int m_cellHeight
 
unsigned int m_nestedBeginCount
 
FT_Face m_face
 
FT_Stroker m_stroker
 
float m_originX
 
float m_originY
 
unsigned int m_nTexture
 
std::vector< CTranslatedVerticesm_vertexTrans
 
std::vector< SVertexm_vertex
 
float m_textureScaleX
 
float m_textureScaleY
 
std::string m_strFileName
 
XUTILS::auto_buffer m_fontFileInMemory
 
CGUIFontCache< CGUIFontCacheStaticPosition, CGUIFontCacheStaticValuem_staticCache
 
CGUIFontCache< CGUIFontCacheDynamicPosition, CGUIFontCacheDynamicValuem_dynamicCache
 
CRenderSystemBasem_renderSystem = nullptr
 
- Protected Attributes inherited from ID3DResource
bool m_bRegistered = false
 
- Static Protected Attributes inherited from CGUIFontTTFBase
static const unsigned int spacing_between_characters_in_texture = 1
 

Constructor & Destructor Documentation

§ CGUIFontTTFDX()

CGUIFontTTFDX::CGUIFontTTFDX ( const std::string &  strFileName)
explicit

§ ~CGUIFontTTFDX()

CGUIFontTTFDX::~CGUIFontTTFDX ( void  )
virtual

Member Function Documentation

§ CopyCharToTexture()

bool CGUIFontTTFDX::CopyCharToTexture ( FT_BitmapGlyph  bitGlyph,
unsigned int  x1,
unsigned int  y1,
unsigned int  x2,
unsigned int  y2 
)
overrideprotectedvirtual

Implements CGUIFontTTFBase.

§ CreateStaticIndexBuffer()

void CGUIFontTTFDX::CreateStaticIndexBuffer ( void  )
static

§ CreateVertexBuffer()

CVertexBuffer CGUIFontTTFDX::CreateVertexBuffer ( const std::vector< SVertex > &  vertices) const
overridevirtual

Reimplemented from CGUIFontTTFBase.

§ DeleteHardwareTexture()

void CGUIFontTTFDX::DeleteHardwareTexture ( )
overrideprotectedvirtual

Implements CGUIFontTTFBase.

§ DestroyStaticIndexBuffer()

static void CGUIFontTTFDX::DestroyStaticIndexBuffer ( void  )
static

§ DestroyVertexBuffer()

void CGUIFontTTFDX::DestroyVertexBuffer ( CVertexBuffer bufferHandle) const
overridevirtual

Reimplemented from CGUIFontTTFBase.

§ FirstBegin()

bool CGUIFontTTFDX::FirstBegin ( )
overridevirtual

Implements CGUIFontTTFBase.

§ LastEnd()

void CGUIFontTTFDX::LastEnd ( )
overridevirtual

Implements CGUIFontTTFBase.

§ OnCreateDevice()

void CGUIFontTTFDX::OnCreateDevice ( void  )
overridevirtual

Implements ID3DResource.

§ OnDestroyDevice()

void CGUIFontTTFDX::OnDestroyDevice ( bool  fatal)
overridevirtual

Implements ID3DResource.

§ ReallocTexture()

CBaseTexture * CGUIFontTTFDX::ReallocTexture ( unsigned int &  newHeight)
overrideprotectedvirtual

Implements CGUIFontTTFBase.


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