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

Cap Rouge is a very simple monospace font for 7-bit ASCII characters between 32 and 127. More...

#include <sg_8x8_CapRouge.hpp>

Inheritance diagram for SG::Font::CapRouge:
Collaboration diagram for SG::Font::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 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 size_t get_width (void) const
 Get the width of each character. More...
 
virtual size_t get_height (void) const
 Get the height of each character. More...
 
virtual Bitmap get (char c) const
 Get a bitmap to use for the given ASCII character. More...
 
virtual Bitmap get (char c, const Fontmap &font_map) const
 

Detailed Description

Cap Rouge is a very simple monospace font for 7-bit ASCII characters between 32 and 127.

The size of 8x8 includes vertical and horizontal blank space needed between characters. For Cap Rouge, this means a blank row on the bottom, and a blank column on the left. Without the blank space, the actual characters are 7x7 (or smaller and padded).

CapRouge_8x8.png

Member Typedef Documentation

◆ Bitmap

typedef std::vector<bool> SG::Font::Monospace::Bitmap
inherited

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

◆ Fontmap

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

Map of every character in this font.

Constructor & Destructor Documentation

◆ CapRouge()

SG::Font::CapRouge::CapRouge ( void  )

Constructor.

◆ ~CapRouge()

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

Destructor.

Member Function Documentation

◆ get() [1/2]

virtual Bitmap SG::Font::Monospace::get ( char  c) const
inlinevirtualinherited

Get a bitmap to use for the given ASCII character.

References SG::Font::Monospace::get_fontmap().

Here is the call graph for this function:

◆ get() [2/2]

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

References SG::Font::Monospace::get_name(), and SG::BeagleBone::Detect::to_string().

Here is the call graph for this function:

◆ get_fontmap()

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

Get the actual font bitmap.

Implements SG::Font::Monospace.

Referenced by get_name().

Here is the caller graph for this function:

◆ get_height()

virtual size_t SG::Font::Monospace::get_height ( void  ) const
inlinevirtualinherited

Get the height of each character.

References SG::Font::Monospace::get_fontmap(), and SG::Font::Monospace::get_name().

Here is the call graph for this function:

◆ get_name()

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

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

Implements SG::Font::Monospace.

References get_fontmap().

Here is the call graph for this function:

◆ get_width()

virtual size_t SG::Font::Monospace::get_width ( void  ) const
inlinevirtualinherited

Get the width of each character.


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