FastArduino v1.10
C++ library to build fast but small Arduino/AVR projects
|
Drawing Mode to use for Display
drawing primitives.
More...
#include <fastarduino/devices/display.h>
Public Member Functions | |
DrawMode (Mode mode=Mode::NO_CHANGE, COLOR color=COLOR{}) | |
Construct a new DrawMode object, to be sued with Display . More... | |
operator bool () const | |
Test if this DrawMode can change display or not, ie if its mode is not Mode::NO_CHANGE . More... | |
Mode | mode () const |
Return the current Mode for this DrawMode . More... | |
COLOR | color () const |
Return the current color for this DrawMode . More... | |
uint8_t | bw_pixels_op (uint8_t source, uint8_t dest) const |
Combine 8 source B&W pixels and 8 destination B&W pixels, all gathered in a byte, according to the Mode set at construction time. More... | |
COLOR | pixel_op (COLOR dest) const |
Combine the predefined color (defined at construction time) with one destination pixel, according to the Mode also set at construction time. More... | |
Drawing Mode to use for Display
drawing primitives.
This encapsulates a pixel operation Mode
and a color to use.
COLOR | the type of one pixel color, as handled by the display device. |
|
inline |
|
inline |
Test if this DrawMode
can change display or not, ie if its mode is not Mode::NO_CHANGE
.
This is useful in order to avoid complex primitive functions that will waste CPU with no effect.
|
inline |
|
inline |
|
inline |
Combine 8 source B&W pixels and 8 destination B&W pixels, all gathered in a byte, according to the Mode
set at construction time.
source | the 8 B&W pixels we want to apply onto dest |
dest | the current 8 B&W pixels present on display, with which source pixels shall be combined according to Mode |
|
inline |
Combine the predefined color (defined at construction time) with one destination pixel, according to the Mode
also set at construction time.
dest | the current pixel color present on display, with which color shall be combined according to Mode |