C++ DevKit
C++ set of OOP library
|
The canvas is a virtual memory in which the widget draws. More...
#include <canvas.h>
Public Member Functions | |
virtual void | create_canvas_buffer ()=0 |
Create a canvas buffer object. | |
virtual void | fill_canvas_with_color (ColorIndex color)=0 |
fill the canvas with a given color | |
Canvas (uint8_t canvas_width_pixel, uint8_t canvas_height_pixel) | |
Construct a new Canvas object. | |
void | clear_canvas_buffer () |
fill the canvas buffer with 0x00 | |
virtual void | draw_pixel (const int x, const int y, const ColorIndex color=ColorIndex::WHITE)=0 |
the graphic primitive to draw a pixel | |
Public Attributes | |
CanvasFormat | canvas_format |
the actual format of the canvas | |
ColorIndex | canvas_fg_color |
a copy of the widget foreground color | |
ColorIndex | canvas_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 |
the size (in bytes) of the buffer | |
uint8_t * | canvas_buffer {nullptr} |
the buffer | |
The canvas is a virtual memory in which the widget draws.
Canvas::Canvas | ( | uint8_t | canvas_width_pixel, |
uint8_t | canvas_height_pixel ) |
Construct a new Canvas object.
canvas_width_pixel | Width of the canvas (in pixel) |
canvas_height_pixel | height of the canvas(in pixel) |
|
pure virtual |
the graphic primitive to draw a pixel
x | the x position of the pixel |
y | the y position of the pixel |
color | the color of the pixel |
Implemented in CanvasHMSB, CanvasRGB, and CanvasVLSB.
|
pure virtual |
fill the canvas with a given color
color |
Implemented in CanvasHMSB, CanvasRGB, and CanvasVLSB.