1
0
mirror of https://github.com/jscrane/r65emu.git synced 2024-12-30 09:30:46 +00:00

TFTDisplay::drawString

This commit is contained in:
Stephen Crane 2018-11-12 07:46:21 +00:00
parent d6dfbe06ef
commit 860e53a8f7
2 changed files with 10 additions and 1 deletions

View File

@ -81,3 +81,11 @@ void TFTDisplay::drawPixel(unsigned x, unsigned y, colour_t col) {
espi.drawPixel(x, y, col); espi.drawPixel(x, y, col);
#endif #endif
} }
void TFTDisplay::drawString(const char *s, unsigned x, unsigned y) {
#if defined(USE_UTFT)
utft.print(s, x, y);
#elif defined(USE_ESPI)
espi.drawString(s, x, y);
#endif
}

View File

@ -31,9 +31,10 @@ class TFTDisplay {
public: public:
void begin(colour_t bg, colour_t fg, orientation_t o = landscape); void begin(colour_t bg, colour_t fg, orientation_t o = landscape);
void clear(); void clear();
void status(const char *); void status(const char *s);
void drawPixel(unsigned x, unsigned y, colour_t col); void drawPixel(unsigned x, unsigned y, colour_t col);
void drawString(const char *s, unsigned x, unsigned y);
protected: protected:
unsigned _bg, _fg, _cx, _cy, _dx, _dy, _oxs; unsigned _bg, _fg, _cx, _cy, _dx, _dy, _oxs;