Pyrogenesis  trunk
Public Member Functions | Private Attributes | List of all members
CFontMetrics Class Reference

Helper class for measuring sizes of text. More...

#include <FontMetrics.h>

Collaboration diagram for CFontMetrics:
Collaboration graph
[legend]

Public Member Functions

 CFontMetrics (CStrIntern font)
 
int GetLineSpacing () const
 
int GetHeight () const
 
int GetCharacterWidth (wchar_t c) const
 
void CalculateStringSize (const wchar_t *string, int &w, int &h) const
 

Private Attributes

shared_ptr< CFontm_Font
 

Detailed Description

Helper class for measuring sizes of text.

This will load the font when necessary, and will return plausible values if loading fails (since misrendering is better than crashing).

Constructor & Destructor Documentation

CFontMetrics::CFontMetrics ( CStrIntern  font)

Member Function Documentation

void CFontMetrics::CalculateStringSize ( const wchar_t string,
int &  w,
int &  h 
) const
int CFontMetrics::GetCharacterWidth ( wchar_t  c) const
int CFontMetrics::GetHeight ( ) const
int CFontMetrics::GetLineSpacing ( ) const

Member Data Documentation

shared_ptr<CFont> CFontMetrics::m_Font
private

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