#include <Display/DisplayInterfaces/DisplayInterfaceSSD1306.hpp>
This class creates a mapping between the Adafruit_SSD1306 display driver and the general display interface used by the Control Surface library.
Definition at line 14 of file DisplayInterfaceSSD1306.hpp.
Public Member Functions | |
void | clear () override |
Clear the frame buffer or clear the display. | |
void | drawBackground () override=0 |
Draw a custom background. | |
void | display () override |
Write the frame buffer to the display. | |
void | drawPixel (int16_t x, int16_t y, uint16_t color) override |
Paint a single pixel with the given color. | |
void | setTextColor (uint16_t color) override |
Set the text color. | |
void | setTextSize (uint8_t size) override |
Set the text size. | |
void | setCursor (int16_t x, int16_t y) override |
Set the cursor position. | |
size_t | write (uint8_t c) override |
Write a character to the display. | |
void | drawLine (int16_t x0, int16_t y0, int16_t x1, int16_t y1, uint16_t color) override |
Draw a line between two points. | |
void | drawFastVLine (int16_t x, int16_t y, int16_t h, uint16_t color) override |
Draw a vertical line. | |
void | drawFastHLine (int16_t x, int16_t y, int16_t w, uint16_t color) override |
Draw a horizontal line. | |
void | drawXBitmap (int16_t x, int16_t y, const uint8_t bitmap[], int16_t w, int16_t h, uint16_t color) override |
Draw a bitmap to the display. | |
virtual void | begin () |
Initialize the display. | |
virtual void | fillRect (int16_t x, int16_t y, int16_t w, int16_t h, uint16_t color) |
Draw a filled rectangle. | |
virtual void | drawCircle (int16_t x0, int16_t y0, int16_t r, uint16_t color) |
Draw a circle. | |
virtual void | fillCircle (int16_t x0, int16_t y0, int16_t r, uint16_t color) |
Draw a disk (filled circle). | |
void | clearAndDrawBackground () |
Clear the frame buffer, and draw the custom background. | |
Protected Member Functions | |
SSD1306_DisplayInterface (Adafruit_SSD1306 &display) | |
Protected Attributes | |
Adafruit_SSD1306 & | disp |
|
inlineprotected |
Definition at line 16 of file DisplayInterfaceSSD1306.hpp.
|
inlineoverridevirtual |
Clear the frame buffer or clear the display.
Implements DisplayInterface.
Definition at line 20 of file DisplayInterfaceSSD1306.hpp.
|
overridepure virtual |
Draw a custom background.
Reimplemented from DisplayInterface.
|
inlineoverridevirtual |
Write the frame buffer to the display.
If your display library writes to the display directly, without a display buffer in RAM, you can leave this function empty.
Implements DisplayInterface.
Definition at line 26 of file DisplayInterfaceSSD1306.hpp.
Paint a single pixel with the given color.
Implements DisplayInterface.
Definition at line 29 of file DisplayInterfaceSSD1306.hpp.
Set the text color.
Implements DisplayInterface.
Definition at line 34 of file DisplayInterfaceSSD1306.hpp.
Set the text size.
Implements DisplayInterface.
Definition at line 36 of file DisplayInterfaceSSD1306.hpp.
Set the cursor position.
Implements DisplayInterface.
Definition at line 38 of file DisplayInterfaceSSD1306.hpp.
Write a character to the display.
Implements DisplayInterface.
Definition at line 47 of file DisplayInterfaceSSD1306.hpp.
|
inlineoverridevirtual |
Draw a line between two points.
Implements DisplayInterface.
Definition at line 50 of file DisplayInterfaceSSD1306.hpp.
Draw a vertical line.
Implements DisplayInterface.
Definition at line 55 of file DisplayInterfaceSSD1306.hpp.
Draw a horizontal line.
Implements DisplayInterface.
Definition at line 60 of file DisplayInterfaceSSD1306.hpp.
|
inlineoverridevirtual |
Draw a bitmap to the display.
Implements DisplayInterface.
Definition at line 66 of file DisplayInterfaceSSD1306.hpp.
|
virtualinherited |
Initialize the display.
Definition at line 5 of file DisplayInterface.cpp.
Draw a filled rectangle.
Definition at line 11 of file DisplayInterface.cpp.
Draw a circle.
Definition at line 17 of file DisplayInterface.cpp.
Draw a disk (filled circle).
Definition at line 40 of file DisplayInterface.cpp.
|
inlineinherited |
Clear the frame buffer, and draw the custom background.
Definition at line 83 of file DisplayInterface.hpp.
|
protected |
Definition at line 72 of file DisplayInterfaceSSD1306.hpp.