Kodi Documentation 22.0
Kodi is an open source media player and entertainment hub.
Loading...
Searching...
No Matches

#include <GUIFont.h>

Public Member Functions

 CGUIFont (const std::string &strFontName, uint32_t style, KODI::UTILS::COLOR::Color textColor, KODI::UTILS::COLOR::Color shadowColor, float lineSpacing, float origHeight, CGUIFontTTF *font)
 
virtual ~CGUIFont ()
 
std::string & GetFontName ()
 
void DrawText (float x, float y, KODI::UTILS::COLOR::Color color, KODI::UTILS::COLOR::Color shadowColor, const vecText &text, uint32_t alignment, float maxPixelWidth)
 
void DrawText (float x, float y, const std::vector< KODI::UTILS::COLOR::Color > &colors, KODI::UTILS::COLOR::Color shadowColor, const vecText &text, uint32_t alignment, float maxPixelWidth)
 
void DrawScrollingText (float x, float y, const std::vector< KODI::UTILS::COLOR::Color > &colors, KODI::UTILS::COLOR::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)
 
void Begin ()
 
void End ()
 
uint32_t GetStyle () const
 
CGUIFontTTFGetFont () const
 
void SetFont (CGUIFontTTF *font)
 

Protected Attributes

std::string m_strFontName
 
uint32_t m_style
 
KODI::UTILS::COLOR::Color m_shadowColor
 
KODI::UTILS::COLOR::Color m_textColor
 
float m_lineSpacing
 
float m_origHeight
 
CGUIFontTTFm_font
 

Constructor & Destructor Documentation

◆ CGUIFont()

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

◆ ~CGUIFont()

CGUIFont::~CGUIFont ( )
virtual

Member Function Documentation

◆ Begin()

void CGUIFont::Begin ( )

◆ DrawScrollingText()

void CGUIFont::DrawScrollingText ( float x,
float y,
const std::vector< KODI::UTILS::COLOR::Color > & colors,
KODI::UTILS::COLOR::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< KODI::UTILS::COLOR::Color > & colors,
KODI::UTILS::COLOR::Color shadowColor,
const vecText & text,
uint32_t alignment,
float maxPixelWidth )

◆ DrawText() [2/2]

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

◆ End()

void CGUIFont::End ( )

◆ GetCharWidth()

float CGUIFont::GetCharWidth ( character_t ch)

◆ GetFont()

CGUIFontTTF * 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)

◆ SetFont()

void CGUIFont::SetFont ( CGUIFontTTF * font)

◆ UpdateScrollInfo()

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

Member Data Documentation

◆ m_font

CGUIFontTTF* CGUIFont::m_font
protected

◆ m_lineSpacing

float CGUIFont::m_lineSpacing
protected

◆ m_origHeight

float CGUIFont::m_origHeight
protected

◆ m_shadowColor

KODI::UTILS::COLOR::Color CGUIFont::m_shadowColor
protected

◆ m_strFontName

std::string CGUIFont::m_strFontName
protected

◆ m_style

uint32_t CGUIFont::m_style
protected

◆ m_textColor

KODI::UTILS::COLOR::Color CGUIFont::m_textColor
protected

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