Pyrogenesis  trunk
Classes | Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
CFont Class Reference

Storage for a bitmap font. More...

#include <Font.h>

Collaboration diagram for CFont:
Collaboration graph
[legend]

Classes

struct  GlyphData
 
class  GlyphMap
 Relatively efficient lookup of GlyphData from 16-bit Unicode codepoint. More...
 

Public Member Functions

bool HasRGB () const
 
int GetLineSpacing () const
 
int GetHeight () const
 
int GetCharacterWidth (wchar_t c) const
 
void CalculateStringSize (const wchar_t *string, int &w, int &h) const
 
void GetGlyphBounds (float &x0, float &y0, float &x1, float &y1) const
 
const GlyphMapGetGlyphs () const
 
CTexturePtr GetTexture () const
 

Private Member Functions

 CFont ()=default
 

Private Attributes

CTexturePtr m_Texture
 
bool m_HasRGB
 
GlyphMap m_Glyphs
 
int m_LineSpacing
 
int m_Height
 
float m_BoundsX0
 
float m_BoundsY0
 
float m_BoundsX1
 
float m_BoundsY1
 

Friends

class CFontManager
 

Detailed Description

Storage for a bitmap font.

Loaded by CFontManager.

Constructor & Destructor Documentation

◆ CFont()

CFont::CFont ( )
privatedefault

Member Function Documentation

◆ CalculateStringSize()

void CFont::CalculateStringSize ( const wchar_t *  string,
int &  w,
int &  h 
) const

◆ GetCharacterWidth()

int CFont::GetCharacterWidth ( wchar_t  c) const

◆ GetGlyphBounds()

void CFont::GetGlyphBounds ( float &  x0,
float &  y0,
float &  x1,
float &  y1 
) const
inline

◆ GetGlyphs()

const GlyphMap& CFont::GetGlyphs ( ) const
inline

◆ GetHeight()

int CFont::GetHeight ( ) const
inline

◆ GetLineSpacing()

int CFont::GetLineSpacing ( ) const
inline

◆ GetTexture()

CTexturePtr CFont::GetTexture ( ) const
inline

◆ HasRGB()

bool CFont::HasRGB ( ) const
inline

Friends And Related Function Documentation

◆ CFontManager

friend class CFontManager
friend

Member Data Documentation

◆ m_BoundsX0

float CFont::m_BoundsX0
private

◆ m_BoundsX1

float CFont::m_BoundsX1
private

◆ m_BoundsY0

float CFont::m_BoundsY0
private

◆ m_BoundsY1

float CFont::m_BoundsY1
private

◆ m_Glyphs

GlyphMap CFont::m_Glyphs
private

◆ m_HasRGB

bool CFont::m_HasRGB
private

◆ m_Height

int CFont::m_Height
private

◆ m_LineSpacing

int CFont::m_LineSpacing
private

◆ m_Texture

CTexturePtr CFont::m_Texture
private

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