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

#include <GUIFont.h>

Public Member Functions

 CGUIFont (const std::string &strFontName, uint32_t style, UTILS::Color textColor, UTILS::Color shadowColor, float lineSpacing, float origHeight, CGUIFontTTFBase *font)
 
virtual ~CGUIFont ()
 
std::string & GetFontName ()
 
void DrawText (float x, float y, UTILS::Color color, UTILS::Color shadowColor, const vecText &text, uint32_t alignment, float maxPixelWidth)
 
void DrawText (float x, float y, const std::vector< UTILS::Color > &colors, UTILS::Color shadowColor, const vecText &text, uint32_t alignment, float maxPixelWidth)
 
void DrawScrollingText (float x, float y, const std::vector< UTILS::Color > &colors, UTILS::Color shadowColor, const vecText &text, uint32_t alignment, float maxPixelWidth, const CScrollInfo &scrollInfo)
 
bool UpdateScrollInfo (const vecText &text, CScrollInfo &scrollInfo)
 
float GetTextWidth (const vecText &text)
 
float GetCharWidth (character_t ch)
 
float GetTextHeight (int numLines) const
 
float GetTextBaseLine () const
 
float GetLineHeight () const
 
float GetScaleFactor () const
 get font scale factor (rendered height / original height) More...
 
void Begin ()
 
void End ()
 
uint32_t GetStyle () const
 
CGUIFontTTFBaseGetFont () const
 
void SetFont (CGUIFontTTFBase *font)
 

Static Public Member Functions

static wchar_t RemapGlyph (wchar_t letter)
 

Protected Attributes

std::string m_strFontName
 
uint32_t m_style
 
UTILS::Color m_shadowColor
 
UTILS::Color m_textColor
 
float m_lineSpacing
 
float m_origHeight
 
CGUIFontTTFBasem_font
 

Constructor & Destructor Documentation

◆ CGUIFont()

CGUIFont::CGUIFont ( const std::string &  strFontName,
uint32_t  style,
UTILS::Color  textColor,
UTILS::Color  shadowColor,
float  lineSpacing,
float  origHeight,
CGUIFontTTFBase font 
)

◆ ~CGUIFont()

CGUIFont::~CGUIFont ( )
virtual

Member Function Documentation

◆ Begin()

void CGUIFont::Begin ( )

◆ DrawScrollingText()

void CGUIFont::DrawScrollingText ( float  x,
float  y,
const std::vector< UTILS::Color > &  colors,
UTILS::Color  shadowColor,
const vecText text,
uint32_t  alignment,
float  maxPixelWidth,
const CScrollInfo scrollInfo 
)

◆ DrawText() [1/2]

void CGUIFont::DrawText ( float  x,
float  y,
const std::vector< UTILS::Color > &  colors,
UTILS::Color  shadowColor,
const vecText text,
uint32_t  alignment,
float  maxPixelWidth 
)

◆ DrawText() [2/2]

void CGUIFont::DrawText ( float  x,
float  y,
UTILS::Color  color,
UTILS::Color  shadowColor,
const vecText text,
uint32_t  alignment,
float  maxPixelWidth 
)
inline

◆ End()

void CGUIFont::End ( )

◆ GetCharWidth()

float CGUIFont::GetCharWidth ( character_t  ch)

◆ GetFont()

CGUIFontTTFBase * CGUIFont::GetFont ( ) const
inline

◆ GetFontName()

std::string & CGUIFont::GetFontName ( )

◆ GetLineHeight()

float CGUIFont::GetLineHeight ( ) const

◆ GetScaleFactor()

float CGUIFont::GetScaleFactor ( ) const

get font scale factor (rendered height / original height)

◆ GetStyle()

uint32_t CGUIFont::GetStyle ( ) const
inline

◆ GetTextBaseLine()

float CGUIFont::GetTextBaseLine ( ) const

◆ GetTextHeight()

float CGUIFont::GetTextHeight ( int  numLines) const

◆ GetTextWidth()

float CGUIFont::GetTextWidth ( const vecText text)

◆ RemapGlyph()

wchar_t CGUIFont::RemapGlyph ( wchar_t  letter)
static

◆ SetFont()

void CGUIFont::SetFont ( CGUIFontTTFBase font)

◆ UpdateScrollInfo()

bool CGUIFont::UpdateScrollInfo ( const vecText text,
CScrollInfo scrollInfo 
)

Member Data Documentation

◆ m_font

CGUIFontTTFBase* CGUIFont::m_font
protected

◆ m_lineSpacing

float CGUIFont::m_lineSpacing
protected

◆ m_origHeight

float CGUIFont::m_origHeight
protected

◆ m_shadowColor

UTILS::Color CGUIFont::m_shadowColor
protected

◆ m_strFontName

std::string CGUIFont::m_strFontName
protected

◆ m_style

uint32_t CGUIFont::m_style
protected

◆ m_textColor

UTILS::Color CGUIFont::m_textColor
protected

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