Aether
SDL2 based UI Framework for NX
Public Member Functions | List of all members
Aether::GlyphMetrics Class Reference

Class storing metrics for a font's character. Designed to be read-only as it is only able to return values passed at construction. More...

#include <GlyphMetrics.hpp>

Public Member Functions

 GlyphMetrics ()
 Recommended height of a line containing the glyph. More...
 
 GlyphMetrics (const uint16_t ch, const int width, const int height, const int lineHeight)
 Create a new GlyphMetrics object. More...
 
uint16_t character ()
 Returns character referenced by metrics. More...
 
int width ()
 Return the width of the glyph. More...
 
int height ()
 Return the height of the glyph. More...
 
int lineHeight ()
 Return the recommend line height for the glyph. More...
 

Detailed Description

Class storing metrics for a font's character. Designed to be read-only as it is only able to return values passed at construction.

Constructor & Destructor Documentation

◆ GlyphMetrics() [1/2]

Aether::GlyphMetrics::GlyphMetrics ( )

Recommended height of a line containing the glyph.

Default constructor to initialize with blank values

◆ GlyphMetrics() [2/2]

Aether::GlyphMetrics::GlyphMetrics ( const uint16_t  ch,
const int  width,
const int  height,
const int  lineHeight 
)

Create a new GlyphMetrics object.

Parameters
chCharacter metrics are for
widthWidth of glyph
heightHeight of glyph
lineHeightHeight of line containing glyph

Member Function Documentation

◆ character()

uint16_t Aether::GlyphMetrics::character ( )

Returns character referenced by metrics.

Returns
UTF-8 character code

◆ height()

int Aether::GlyphMetrics::height ( )

Return the height of the glyph.

Returns
Height of glyph in pixels

◆ lineHeight()

int Aether::GlyphMetrics::lineHeight ( )

Return the recommend line height for the glyph.

Returns
Recommended height of a line containing this glyph

◆ width()

int Aether::GlyphMetrics::width ( )

Return the width of the glyph.

Returns
Width of glyph in pixels

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