Tc Unicode Helper
Toggle main menu visibility
Loading...
Searching...
No Matches
src
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
18
namespace
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
TextPlotPipeline
Definition
tcUnicodeHelper.h:74
tcgfx::TftSpiTextPlotPipeline::getDimensions
Coord getDimensions() override
Definition
tcUnicodeTFT_eSPI.h:28
tcgfx::TftSpiTextPlotPipeline::drawPixel
void drawPixel(uint16_t x, uint16_t y, uint32_t dc) override
Definition
tcUnicodeTFT_eSPI.h:27
tcgfx::TftSpiTextPlotPipeline::getCursor
Coord getCursor() override
Definition
tcUnicodeTFT_eSPI.h:30
tcgfx::TftSpiTextPlotPipeline::setCursor
void setCursor(const Coord &where) override
Definition
tcUnicodeTFT_eSPI.h:29
tcgfx::Coord
Definition
tcUnicodeHelper.h:40
tcUnicodeHelper.h
contains a Unicode handler that can process UTF-8 data and print it onto most display types.