Tc Unicode Helper
Toggle main menu visibility
Loading...
Searching...
No Matches
src
tcUnicodeAdaGFX.h
Go to the documentation of this file.
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 <Adafruit_GFX.h>
17
18
namespace
tcgfx {
19
class
AdafruitTextPlotPipeline :
public
TextPlotPipeline
{
20
private
:
21
Adafruit_GFX *gfx;
22
public
:
23
explicit
AdafruitTextPlotPipeline(Adafruit_GFX *gfx) : gfx(gfx) {
24
}
25
26
~AdafruitTextPlotPipeline() =
default
;
27
28
void
drawPixel
(uint16_t x, uint16_t y, uint32_t dc)
override
{
return
gfx->drawPixel(x, y, dc); }
29
30
void
setCursor
(
const
Coord
&where)
override
{ gfx->setCursor(where.x, where.y); }
31
32
Coord
getCursor
()
override
{
return
Coord
(gfx->getCursorX(), gfx->getCursorY()); }
33
34
Coord
getDimensions
()
override
{
return
Coord
(gfx->width(), gfx->height()); }
35
};
36
43
inline
AdafruitTextPlotPipeline
*
newAdafruitTextPipeline
(Adafruit_GFX *gfx) {
44
return
new
AdafruitTextPlotPipeline
(gfx);
45
}
46
}
47
48
#endif
//TCMENU_UNICODE_ADAGFX_H
TextPlotPipeline
Definition
tcUnicodeHelper.h:74
tcgfx::AdafruitTextPlotPipeline
Definition
tcUnicodeAdaGFX.h:19
tcgfx::AdafruitTextPlotPipeline::setCursor
void setCursor(const Coord &where) override
Definition
tcUnicodeAdaGFX.h:30
tcgfx::AdafruitTextPlotPipeline::getCursor
Coord getCursor() override
Definition
tcUnicodeAdaGFX.h:32
tcgfx::AdafruitTextPlotPipeline::drawPixel
void drawPixel(uint16_t x, uint16_t y, uint32_t dc) override
Definition
tcUnicodeAdaGFX.h:28
tcgfx::AdafruitTextPlotPipeline::getDimensions
Coord getDimensions() override
Definition
tcUnicodeAdaGFX.h:34
tcgfx::Coord
Definition
tcUnicodeHelper.h:40
tcgfx::newAdafruitTextPipeline
AdafruitTextPlotPipeline * newAdafruitTextPipeline(Adafruit_GFX *gfx)
Definition
tcUnicodeAdaGFX.h:43
tcUnicodeHelper.h
contains a Unicode handler that can process UTF-8 data and print it onto most display types.