Tc Unicode Helper
Loading...
Searching...
No Matches
tcUnicodeTFT_eSPI.h
1/*
2 * Copyright (c) 2018 https://www.thecoderscorner.com (Dave Cherry).
3 * This product is licensed under an Apache license, see the LICENSE file in the top-level directory.
4 */
5
11
12#ifndef TCMENU_UNICODE_ADAGFX_H
13#define TCMENU_UNICODE_ADAGFX_H
14
15#include "tcUnicodeHelper.h"
16#include <TFT_eSPI.h>
17
18namespace tcgfx {
19
20 class TftSpiTextPlotPipeline : public TextPlotPipeline {
21 private:
22 TFT_eSPI* tft;
23 Coord cursor;
24 public:
25 TftSpiTextPlotPipeline(TFT_eSPI* tft) : tft(tft) {}
26 ~TftSpiTextPlotPipeline()=default;
27 void drawPixel(uint16_t x, uint16_t y, uint32_t dc) override { return tft->drawPixel(x, y, dc); }
28 Coord getDimensions() override { return Coord(tft->width(), tft->height());}
29 void setCursor(const Coord& where) override { cursor = where; }
30 Coord getCursor() override { return cursor; }
31 };
32
39 inline TftSpiTextPlotPipeline *newTFT_eSPITextPipeline(TFT_eSPI *gfx) {
40 return new TftSpiTextPlotPipeline(gfx);
41 }
42}
43
44#endif //TCMENU_UNICODE_ADAGFX_H
Definition tcUnicodeHelper.h:74
Coord getDimensions() override
Definition tcUnicodeTFT_eSPI.h:28
void drawPixel(uint16_t x, uint16_t y, uint32_t dc) override
Definition tcUnicodeTFT_eSPI.h:27
Coord getCursor() override
Definition tcUnicodeTFT_eSPI.h:30
void setCursor(const Coord &where) override
Definition tcUnicodeTFT_eSPI.h:29
Definition tcUnicodeHelper.h:40
contains a Unicode handler that can process UTF-8 data and print it onto most display types.