Seeed Grove ++  v0.0.1-1774
Linux C++ Library For Seeed Grove Devices
SG::MonospaceFont Class Referenceabstract

Very simple monospace font, for 7-bit ASCII characters, typically between 0x20 and 0x7f. More...

#include <sg_MonospaceFont.hpp>

Inheritance diagram for SG::MonospaceFont:

Public Types

typedef std::vector< bool > Bitmap
 Bitmap of a single character, showing which pixels to turn on/off. More...
 
typedef std::map< char, BitmapFontmap
 Map of every character in this font. More...
 

Public Member Functions

 MonospaceFont (void)
 Constructor. More...
 
virtual ~MonospaceFont (void)
 Destructor. More...
 
virtual size_t get_width (void) const =0
 Get the width of each character. More...
 
virtual size_t get_height (void) const =0
 Get the height of each character. More...
 
virtual std::string get_name (void) const =0
 Get the font name. More...
 
virtual Fontmap get_fontmap (void) const =0
 Get the actual font bitmap. More...
 
virtual Bitmap get (char c) const
 Get a bitmap to use for the given 7-bit ASCII character. More...
 
virtual Bitmap get (char c, const Fontmap &font_map) const
 

Detailed Description

Very simple monospace font, for 7-bit ASCII characters, typically between 0x20 and 0x7f.

Member Typedef Documentation

typedef std::vector<bool> SG::MonospaceFont::Bitmap

Bitmap of a single character, showing which pixels to turn on/off.

typedef std::map<char, Bitmap> SG::MonospaceFont::Fontmap

Map of every character in this font.

Constructor & Destructor Documentation

SG::MonospaceFont::MonospaceFont ( void  )

Constructor.

SG::MonospaceFont::~MonospaceFont ( void  )
virtual

Destructor.

Member Function Documentation

SG::MonospaceFont::Bitmap SG::MonospaceFont::get ( char  c) const
virtual

Get a bitmap to use for the given 7-bit ASCII character.

SG::MonospaceFont::Bitmap SG::MonospaceFont::get ( char  c,
const Fontmap font_map 
) const
virtual
Exceptions
std::invalid_argumentif the character isn't available in the given font.

References SG::BeagleBone::to_string().

Here is the call graph for this function:

virtual Fontmap SG::MonospaceFont::get_fontmap ( void  ) const
pure virtual

Get the actual font bitmap.

Implemented in SG::CapRouge.

virtual size_t SG::MonospaceFont::get_height ( void  ) const
pure virtual

Get the height of each character.

Implemented in SG::CapRouge.

virtual std::string SG::MonospaceFont::get_name ( void  ) const
pure virtual

Get the font name.

Implemented in SG::CapRouge.

virtual size_t SG::MonospaceFont::get_width ( void  ) const
pure virtual

Get the width of each character.

Implemented in SG::CapRouge.


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