Peritoneal Dialysis Capstone
Controlling catheter for peritoneal dialysis
Loading...
Searching...
No Matches
TFTDriver.h
Go to the documentation of this file.
1
4
5#ifndef TFT_DRIVER_H
6#define TFT_DRIVER_H
7
8#include <TFT.h>
9
13class TFTDriver {
14public:
20 virtual void initialize() = 0;
21
25 [[nodiscard]] virtual unsigned getScreenWidth() const = 0;
26
30 [[nodiscard]] virtual unsigned getScreenHeight() const = 0;
31
35 [[nodiscard]] virtual unsigned getTextWidth() const = 0;
36
40 [[nodiscard]] virtual unsigned getTextHeight() const = 0;
41
48 virtual void clearScreen(TFTColor color) = 0;
49
61 virtual void drawText(
62 TFTPoint topLeft, TFTColor textColor, TFTColor bgColor, const char *string
63 ) = 0;
64};
65
66#endif // TFT_DRIVER_H
TFTColor
A color used for drawing on a TFT display.
Definition TFT.h:14
A low-level interface to a TFT display.
Definition TFTDriver.h:13
virtual void clearScreen(TFTColor color)=0
Assigns one color to all pixels on the screen, clearing any previously drawn text.
virtual unsigned getScreenWidth() const =0
Returns the width, in pixels, of the screen.
virtual unsigned getTextHeight() const =0
Returns the height, in pixels, of one character.
virtual void drawText(TFTPoint topLeft, TFTColor textColor, TFTColor bgColor, const char *string)=0
Draws monospace text.
virtual unsigned getTextWidth() const =0
Returns the width, in pixels, of one character.
virtual void initialize()=0
Initializes the display.
virtual unsigned getScreenHeight() const =0
Returns the height, in pixels, of the screen.
The position of a pixel on a TFT display, given in Cartesian coordinates.
Definition TFT.h:27