Tc Unicode Helper
Public Member Functions | List of all members
TextPlotPipeline Class Referenceabstract

#include <tcUnicodeHelper.h>

Inheritance diagram for TextPlotPipeline:
tcgfx::AdafruitTextPlotPipeline tcgfx::TftSpiTextPlotPipeline tcgfx::U8g2TextPlotPipeline

Public Member Functions

virtual void drawPixel (uint16_t x, uint16_t y, uint32_t color)=0
 
virtual void setCursor (const Coord &where)=0
 
virtual Coord getCursor ()=0
 
virtual Coord getDimensions ()=0
 

Detailed Description

A plot pipeline takes care of actually drawing the font glyphs in terms of pixels and cursor positions, it allows for independent implementation on many different graphics libraries. There are ready made implementation for U8G2, Adafruit_GFX, tcMenu Drawable and TFT_eSPI. Should you wish to create one for another display, follow one of the example device includes such as tcUnicodeU8G2.h.

Member Function Documentation

◆ drawPixel()

virtual void TextPlotPipeline::drawPixel ( uint16_t  x,
uint16_t  y,
uint32_t  color 
)
pure virtual

Draw a pixel onto the device at the given coordinates

Parameters
xthe x position increases left to right
ythe y position increases top to bottom
colorthe color in whatever format the device uses

Implemented in tcgfx::TftSpiTextPlotPipeline, tcgfx::AdafruitTextPlotPipeline, and tcgfx::U8g2TextPlotPipeline.

◆ getCursor()

virtual Coord TextPlotPipeline::getCursor ( )
pure virtual
Returns
the current coordinates for print

Implemented in tcgfx::U8g2TextPlotPipeline, tcgfx::TftSpiTextPlotPipeline, and tcgfx::AdafruitTextPlotPipeline.

◆ getDimensions()

virtual Coord TextPlotPipeline::getDimensions ( )
pure virtual
Returns
the dimensions of the underlying display object

Implemented in tcgfx::U8g2TextPlotPipeline, tcgfx::TftSpiTextPlotPipeline, and tcgfx::AdafruitTextPlotPipeline.

◆ setCursor()

virtual void TextPlotPipeline::setCursor ( const Coord where)
pure virtual

Set the position that the next text will be printed at, handling of offscreen is minimal, and just stops rendering

Parameters
wherethe coordinate to draw at

Implemented in tcgfx::U8g2TextPlotPipeline, tcgfx::TftSpiTextPlotPipeline, and tcgfx::AdafruitTextPlotPipeline.


The documentation for this class was generated from the following file: