36 virtual void drawPixel(int16_t x, int16_t y, uint16_t color) = 0;
52 size_t write(uint8_t c)
override = 0;
55 virtual void drawLine(int16_t x0, int16_t y0, int16_t x1, int16_t y1,
65 virtual void drawXBitmap(int16_t x, int16_t y,
const uint8_t bitmap[],
66 int16_t w, int16_t h, uint16_t color) = 0;
69 virtual void fillRect(int16_t x, int16_t y, int16_t w, int16_t h,
73 virtual void drawCircle(int16_t x0, int16_t y0, int16_t r, uint16_t color);
76 virtual void fillCircle(int16_t x0, int16_t y0, int16_t r, uint16_t color);
#define BEGIN_CS_NAMESPACE
An interface for displays.
virtual void drawFastHLine(int16_t x, int16_t y, int16_t w, uint16_t color)=0
Draw a horizontal line.
virtual void drawPixel(int16_t x, int16_t y, uint16_t color)=0
Paint a single pixel with the given color.
virtual void setTextColor(uint16_t color)=0
Set the text color.
void clearAndDrawBackground()
Clear the frame buffer, and draw the custom background.
virtual void setCursor(int16_t x, int16_t y)=0
Set the cursor position.
virtual void clear()=0
Clear the frame buffer or clear the display.
virtual void drawXBitmap(int16_t x, int16_t y, const uint8_t bitmap[], int16_t w, int16_t h, uint16_t color)=0
Draw a bitmap to the display.
virtual void fillCircle(int16_t x0, int16_t y0, int16_t r, uint16_t color)
Draw a disk (filled circle).
virtual void fillRect(int16_t x, int16_t y, int16_t w, int16_t h, uint16_t color)
Draw a filled rectangle.
virtual void display()=0
Write the frame buffer to the display.
DisplayInterface()=default
virtual void drawFastVLine(int16_t x, int16_t y, int16_t h, uint16_t color)=0
Draw a vertical line.
size_t write(uint8_t c) override=0
Write a character to the display.
virtual void drawLine(int16_t x0, int16_t y0, int16_t x1, int16_t y1, uint16_t color)=0
Draw a line between two points.
virtual void begin()
Initialize the display.
virtual void drawCircle(int16_t x0, int16_t y0, int16_t r, uint16_t color)
Draw a circle.
virtual ~DisplayInterface()=default
virtual void setTextSize(uint8_t size)=0
Set the text size.
virtual void drawBackground()
Draw a custom background.