FastArduino v1.10
C++ library to build fast but small Arduino/AVR projects
Loading...
Searching...
No Matches
devices::display::DrawContext< COLOR, VERTICAL_FONT > Class Template Reference

Drawing Context passed to display devices low-level primitives set_pixel() and write_char(). More...

#include <fastarduino/devices/display.h>

Public Member Functions

DrawMode< COLOR > draw_mode () const
 Return the current DrawMode to use in the called primitive. More...
 
const Font< VERTICAL_FONT > & font () const
 Return the current Font to use in the called primitive draw_char() More...
 

Friends

template<typename >
class Display
 

Detailed Description

template<typename COLOR, bool VERTICAL_FONT>
class devices::display::DrawContext< COLOR, VERTICAL_FONT >

Drawing Context passed to display devices low-level primitives set_pixel() and write_char().

Conext includes:

  • current font
  • current drawing mode for outlines
  • current drawing mode for areas filling

Display devices can only use the context passed by Display high level primitives. They cannot create such contexts.

Template Parameters
COLORthe color type associated with the display device
VERTICAL_FONTtrue if the display device supports vertical fonts, false otherwise

Definition at line 247 of file display.h.

Member Function Documentation

◆ draw_mode()

template<typename COLOR , bool VERTICAL_FONT>
DrawMode< COLOR > devices::display::DrawContext< COLOR, VERTICAL_FONT >::draw_mode ( ) const
inline

Return the current DrawMode to use in the called primitive.

This might be the mode for outline drawing or areas filling, based on the Display calling primitive.

Returns
DrawMode<COLOR> the draw mode to use fro drwaing pixels or characters

Definition at line 261 of file display.h.

◆ font()

template<typename COLOR , bool VERTICAL_FONT>
const Font< VERTICAL_FONT > & devices::display::DrawContext< COLOR, VERTICAL_FONT >::font ( ) const
inline

Return the current Font to use in the called primitive draw_char()

Returns
const Font<VERTICAL_FONT>& the font to use for drawing a character

Definition at line 271 of file display.h.

Friends And Related Function Documentation

◆ Display

template<typename COLOR , bool VERTICAL_FONT>
template<typename >
friend class Display
friend

Definition at line 284 of file display.h.


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