LCDGFX LCD display driver
2.0.1
This library is developed to control SSD1306/SSD1325/SSD1327/SSD1331/SSD1351/IL9163/PCD8554 RGB i2c/spi LED displays
|
#include <display_base.h>
Public Member Functions | |
NanoDisplayBase (I &intf) | |
void | setOffset (lcdint_t ox, lcdint_t oy) |
const NanoPoint | offsetEnd () const |
const NanoRect | rect () const |
lcduint_t | width () |
lcduint_t | height () |
void | swapDimensions () |
void | setColor (uint16_t color) |
void | negativeMode () |
void | positiveMode () |
I & | getInterface () |
void | setFont (NanoFont &font) |
NanoFont & | getFont () |
void | setFixedFont (const uint8_t *progmemFont) |
void | setFixedFont (const uint8_t *progmemFont, const uint8_t *secondaryFont) |
void | setFreeFont (const uint8_t *progmemFont, const uint8_t *secondaryFont=nullptr) |
Protected Attributes | |
lcduint_t | m_w = 0 |
width of NanoCanvas area in pixels | |
lcduint_t | m_h = 0 |
height of NanoCanvas area in pixels | |
lcduint_t | m_p = 0 |
number of bits, used by width value: 3 equals to 8 pixels width | |
lcdint_t | m_cursorX = 0 |
current X cursor position for text output | |
lcdint_t | m_cursorY = 0 |
current Y cursor position for text output | |
uint8_t | m_textMode = 0 |
Flags for current NanoCanvas mode. | |
EFontStyle | m_fontStyle |
currently active font style | |
uint16_t | m_color = 0xFFFF |
current color for monochrome operations | |
NanoFont * | m_font = nullptr |
currently set font | |
I & | m_intf |
communication interface with the display | |
Class implements basic display operations for the library: It stores reference to communication interafce, display size, etc.
Definition at line 49 of file display_base.h.
|
inline |
Creates new empty base display object. If you this constructor is used, you must call begin() method before working with canvas.
Definition at line 57 of file display_base.h.
|
inline |
Returns reference to NanoFont object, currently used by Display
Definition at line 142 of file display_base.h.
|
inline |
Returns reference to interface communicator. This interface can be used to use display hardware related features.
Definition at line 127 of file display_base.h.
|
inline |
Returns height of the display in pixels.
Definition at line 92 of file display_base.h.
|
inline |
All drawing functions start to work in negative mode. Old picture on the display remains unchanged.
Definition at line 114 of file display_base.h.
|
inline |
Returns right-bottom point of the canvas in offset terms. If offset is (0,0), then offsetEnd() will return (width-1,height-1).
Definition at line 70 of file display_base.h.
|
inline |
All drawing functions start to work in positive (default) mode. Old picture on the display remains unchanged.
Definition at line 120 of file display_base.h.
|
inline |
Returns rectangle area, covered by canvas in offset terms. If offset is (0,0), then rect() will return ((0,0),(width-1,height-1))
Definition at line 79 of file display_base.h.
|
inline |
Sets color for monochrome operations
color | - color to set (refer to RGB_COLOR8 definition) |
Definition at line 108 of file display_base.h.
|
inline |
Sets new font to use with print functions. If multiple oled displays are used in single application, this method can cause conflicts.
progmemFont | pointer to font data in flash (refer to NanoFont::loadFixedFont) |
Definition at line 153 of file display_base.h.
|
inline |
Sets new font to use with print functions. If multiple oled displays are used in single application, this method can cause conflicts.
progmemFont | pointer to font data in flash (refer to NanoFont::loadFixedFont) |
secondaryFont | pointer to font data in flash (refer to NanoFont::loadSecondaryFont) |
Definition at line 177 of file display_base.h.
|
inline |
Sets new font to use with print functions. If multiple oled displays are used in single application, this method allows to use different fonts for different displays.
font | reference to font object (NanoFont) |
Definition at line 137 of file display_base.h.
|
inline |
Sets new font to use with print functions. If multiple oled displays are used in single application, this method can cause conflicts.
progmemFont | pointer to font data in flash (refer to NanoFont::loadFreeFont) |
secondaryFont | pointer to font data in flash (refer to NanoFont::loadSecondaryFont) |
Definition at line 197 of file display_base.h.
|
inline |
Sets offset
ox | - X offset in pixels |
oy | - Y offset in pixels |
Definition at line 64 of file display_base.h.
|
inline |
Swaps width and height dimensions
Definition at line 97 of file display_base.h.
|
inline |
Returns width of the display in pixels.
Definition at line 87 of file display_base.h.