micromenu/inc/gfx/canvas.h
2018-11-05 21:09:01 +01:00

43 lines
673 B
C++

//
// Created by jedi on 11/1/18.
//
#ifndef MGL_DMXMENU_CANVAS_H
#define MGL_DMXMENU_CANVAS_H
#include "hal/hal.h"
#include "gfx/font.h"
#include "fonts/basic_5x4.h"
#include "gfx/buffer_1.h"
#include "gfx/buffer_32.h"
class screen;
class canvas {
private:
const int width_;
const int height_;
buffer_1 buffer_;
void draw_onto_(screen &);
public:
canvas(int w, int h);
void clear();
void draw(int x, int y);
void print(int x, int y, const char *str, font & = basic_5x4);
void print(int x, int y, char *str, font & = basic_5x4);
int getWidth();
int getHeight();
friend screen;
};
#endif //MGL_DMXMENU_CANVAS_H