2018-11-01 18:39:19 +00:00
|
|
|
//
|
|
|
|
// Created by jedi on 11/1/18.
|
|
|
|
//
|
|
|
|
|
|
|
|
#ifndef MGL_DMXMENU_CANVAS_H
|
|
|
|
#define MGL_DMXMENU_CANVAS_H
|
|
|
|
|
|
|
|
#include "hal.h"
|
|
|
|
#include "gfx/font.h"
|
2018-11-02 08:27:20 +00:00
|
|
|
#include "fonts/basic_5x4.h"
|
2018-11-01 18:39:19 +00:00
|
|
|
|
|
|
|
class canvas {
|
|
|
|
private:
|
|
|
|
const int width_;
|
|
|
|
const int height_;
|
|
|
|
public:
|
|
|
|
|
|
|
|
canvas(int w, int h) : width_(w), height_(h) {
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
void draw(int x, int y) {
|
|
|
|
hal_draw(x, y);
|
|
|
|
}
|
|
|
|
|
|
|
|
void print(int x, int y, const char *str) {
|
2018-11-02 08:27:20 +00:00
|
|
|
basic_5x4.print(x, y, str, *this);
|
2018-11-01 18:39:19 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void print(int x, int y, char *str) {
|
2018-11-02 08:27:20 +00:00
|
|
|
basic_5x4.print(x, y, str, *this);
|
2018-11-01 18:39:19 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
#endif //MGL_DMXMENU_CANVAS_H
|