many updates..

new sensors.. display.. led.. drawing.. stuff..
This commit is contained in:
kazu
2019-01-17 23:12:01 +01:00
parent 90e9fee101
commit 5cb02880b3
30 changed files with 5305 additions and 97 deletions

52
ext/lcd/ui/UIPainter.h Normal file
View File

@@ -0,0 +1,52 @@
#ifndef UI_PAINTER_H
#define UI_PAINTER_H
#include "../../../Debug.h"
#include "../Draw.h"
#include "UIStructs.h"
class Setter;
class FontWrap;
extern FontWrap fnt_f1;
extern Setter setter;
class UIPainter {
public:
void drawLine(const uint16_t x1, const uint16_t y1, const uint16_t x2, const uint16_t y2) {
debugMod("UI", "draw line");
drawer.drawLine(x1,y1, x2,y2);
}
void drawLineHor(const uint16_t x1, const uint16_t x2, const uint16_t y) {
drawer.drawLineHor(x1,x2,y);
}
void drawLineVer(const uint16_t y1, const uint16_t y2, const uint16_t x) {
drawer.drawLineVer(y1,y2,x);
}
void drawRect(UIRect r) {
drawer.drawRect(r.x, r.y, r.w, r.h);
}
void drawText(const uint16_t x, const uint16_t y, const char* str) {
fnt_f1.draw(str, x, y, setter);
}
void setFG(const Color fg) {
drawer.setColor(fg);
}
void fillRect(const UIRect rect) {
drawer.fillRect(rect.x, rect.y, rect.w, rect.h);
}
void fillRect(const uint16_t x, const uint16_t y, const uint16_t w, const uint16_t h) {
drawer.fillRect(x,y,w,h);
}
};
#endif // UI_PAINTER_H