A special version of canvas for monochrome widget with 8pixel/byte arranged horizontally. Usefull for monochrome widget (e.g.text) even for color RGB_COLOR_INDEX_8b display device.
More...
#include <canvas.h>
|
|
CanvasFormat | canvas_format |
| | the actual format of the canvas
|
| |
|
ColorIndex | fg_color |
| | a copy of the widget foreground color
|
| |
|
ColorIndex | bg_color |
| | a copy of the widget background color
|
| |
|
uint8_t | canvas_width_pixel |
| | the width (in pixel) of the canvas and also of those of the associated widget
|
| |
|
uint8_t | canvas_height_pixel |
| | the height (in pixel) of the canvas and also of those of the associated widget
|
| |
|
size_t | canvas_buffer_size_byte |
| | the size (in bytes) of the buffer
|
| |
|
size_t | canvas_buffer_size_pixel |
| | the size (in pixel) of the buffer
|
| |
|
uint8_t * | canvas_buffer {nullptr} |
| | the 8bit canvas buffer
|
| |
|
uint16_t * | canvas_16buffer {nullptr} |
| | the 16bit canvasbuffer
|
| |
A special version of canvas for monochrome widget with 8pixel/byte arranged horizontally. Usefull for monochrome widget (e.g.text) even for color RGB_COLOR_INDEX_8b display device.
◆ CanvasHMSB()
| CanvasHMSB::CanvasHMSB |
( |
uint8_t | canvas_width_pixel, |
|
|
uint8_t | canvas_height_pixel ) |
constructor for CanvasHMSB
- Parameters
-
| canvas_width_pixel | |
| canvas_height_pixel | |
◆ draw_pixel()
| void CanvasHMSB::draw_pixel |
( |
const int | x, |
|
|
const int | y, |
|
|
const ColorIndex | color = ColorIndex::WHITE ) |
|
virtual |
the graphic primitive to draw a pixel
- Parameters
-
| x | the x position of the pixel |
| y | the y position of the pixel |
| color | the color of the pixel |
Implements Canvas.
◆ fill_canvas_with_color()
| void CanvasHMSB::fill_canvas_with_color |
( |
ColorIndex | color | ) |
|
|
virtual |
fill the canvas buffer with 0x00 (i.e. BLACK) of 0xFF (WHITE)
- Note
- the conversion from color bit (0b0 or 0b1) to RGB_COLOR_INDEX_8b is done by the device after calling the show() member according to fg_color and bg_color
- Parameters
-
Implements Canvas.
The documentation for this class was generated from the following files: