Peritoneal Dialysis Capstone
Controlling catheter for peritoneal dialysis
Loading...
Searching...
No Matches
TFTDriver Class Referenceabstract

A low-level interface to a TFT display. More...

#include <TFTDriver.h>

Inheritance diagram for TFTDriver:

Public Member Functions

virtual void initialize ()=0
 Initializes the display.
virtual unsigned getScreenWidth () const =0
 Returns the width, in pixels, of the screen.
virtual unsigned getScreenHeight () const =0
 Returns the height, in pixels, of the screen.
virtual unsigned getTextWidth () const =0
 Returns the width, in pixels, of one character.
virtual unsigned getTextHeight () const =0
 Returns the height, in pixels, of one character.
virtual void clearScreen (TFTColor color)=0
 Assigns one color to all pixels on the screen, clearing any previously drawn text.
virtual void drawText (TFTPoint topLeft, TFTColor textColor, TFTColor bgColor, const char *string)=0
 Draws monospace text.

Detailed Description

A low-level interface to a TFT display.

Member Function Documentation

◆ clearScreen()

virtual void TFTDriver::clearScreen ( TFTColor color)
pure virtual

Assigns one color to all pixels on the screen, clearing any previously drawn text.

Parameters
colorThe color to assign.

Implemented in AdafruitTFTDriver.

◆ drawText()

virtual void TFTDriver::drawText ( TFTPoint topLeft,
TFTColor textColor,
TFTColor bgColor,
const char * string )
pure virtual

Draws monospace text.

If the text goes off the right edge of the screen, it is wrapped to the next line.

Parameters
topLeftThe top-left position of the first character.
textColorThe text color.
bgColorThe background color.
stringThe NUL-terminated ASCII string to draw.

Implemented in AdafruitTFTDriver.

◆ getScreenHeight()

virtual unsigned TFTDriver::getScreenHeight ( ) const
nodiscardpure virtual

Returns the height, in pixels, of the screen.

Implemented in AdafruitTFTDriver.

◆ getScreenWidth()

virtual unsigned TFTDriver::getScreenWidth ( ) const
nodiscardpure virtual

Returns the width, in pixels, of the screen.

Implemented in AdafruitTFTDriver.

◆ getTextHeight()

virtual unsigned TFTDriver::getTextHeight ( ) const
nodiscardpure virtual

Returns the height, in pixels, of one character.

Implemented in AdafruitTFTDriver.

◆ getTextWidth()

virtual unsigned TFTDriver::getTextWidth ( ) const
nodiscardpure virtual

Returns the width, in pixels, of one character.

Implemented in AdafruitTFTDriver.

◆ initialize()

virtual void TFTDriver::initialize ( )
pure virtual

Initializes the display.

The display must be initialized before any other functions are called.

Implemented in AdafruitTFTDriver.


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