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

CapRouge is a very simple monospace font for 7-bit ASCII characters between 0 and 127. More...

#include <sg_CapRouge.hpp>

Inheritance diagram for SG::CapRouge:
Collaboration diagram for SG::CapRouge:

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

 CapRouge (void)
 Constructor. More...
 
virtual ~CapRouge (void)
 Destructor. More...
 
virtual size_t get_width (void) const
 Get the width of each character. For Cap Rouge, this will always return 6. More...
 
virtual size_t get_height (void) const
 Get the height of each character. For Cap Rouge, this will always return 8. More...
 
virtual std::string get_name (void) const
 Get the font name. For Cap Rouge, this will always return Cap Rouge. More...
 
virtual Fontmap get_fontmap (void) const
 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

CapRouge is a very simple monospace font for 7-bit ASCII characters between 0 and 127.

The size of 6x8 includes vertical and horizontal blank space needed between characters. This means a blank row on top, and a blank column on the right. Without the blank space, the actual characters are 5x7 (or smaller and padded).

Member Typedef Documentation

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

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

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

Map of every character in this font.

Constructor & Destructor Documentation

SG::CapRouge::CapRouge ( void  )

Constructor.

SG::CapRouge::~CapRouge ( void  )
virtual

Destructor.

Member Function Documentation

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

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
virtualinherited
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:

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

Get the actual font bitmap.

Implements SG::MonospaceFont.

virtual size_t SG::CapRouge::get_height ( void  ) const
inlinevirtual

Get the height of each character. For Cap Rouge, this will always return 8.

Implements SG::MonospaceFont.

virtual std::string SG::CapRouge::get_name ( void  ) const
inlinevirtual

Get the font name. For Cap Rouge, this will always return Cap Rouge.

Implements SG::MonospaceFont.

virtual size_t SG::CapRouge::get_width ( void  ) const
inlinevirtual

Get the width of each character. For Cap Rouge, this will always return 6.

Implements SG::MonospaceFont.


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