39 #if defined(CONFIG_ADAFRUIT_GFX_ENABLE) 43 #ifndef DOXYGEN_SHOULD_SKIP_THIS 48 #include "Adafruit_GFX.h" 51 #include "Adafruit_GFX.h" 54 #endif // DOXYGEN_SHOULD_SKIP_THIS 99 void drawPixel(int16_t x, int16_t y, uint16_t color)
override;
112 #ifndef DOXYGEN_SHOULD_SKIP_THIS 115 void fillScreen(uint16_t color)
override 117 fillRect(offset.
x, offset.
y, _width, _height, color);
126 inline void rotatePosition(int16_t &x, int16_t &y)
128 switch ( getRotation() )
164 virtual void blt() = 0;
180 using AdafruitCanvasBase::AdafruitCanvasBase;
183 #ifndef DOXYGEN_SHOULD_SKIP_THIS 188 if ( (x < 0) || (x >= width()) || (y < 0) || (y >= height()) )
192 rotatePosition(x, y);
196 case 1:
m_buffer[x + (y / 8) * WIDTH] |= (1 << (y & 7));
break;
197 case 0:
m_buffer[x + (y / 8) * WIDTH] &= ~(1 << (y & 7));
break;
198 case 2:
m_buffer[x + (y / 8) * WIDTH] ^= (1 << (y & 7));
break;
201 #endif // DOXYGEN_SHOULD_SKIP_THIS 217 using AdafruitCanvasBase::AdafruitCanvasBase;
220 #ifndef DOXYGEN_SHOULD_SKIP_THIS 225 if ( (x < 0) || (x >= width()) || (y < 0) || (y >= height()) )
229 rotatePosition(x, y);
233 #endif // DOXYGEN_SHOULD_SKIP_THIS 250 using AdafruitCanvasBase::AdafruitCanvasBase;
253 #ifndef DOXYGEN_SHOULD_SKIP_THIS 258 if ( (x < 0) || (x >= width()) || (y < 0) || (y >= height()) )
262 rotatePosition(x, y);
264 m_buffer[(x + y * WIDTH) * 2 + 0] = color;
265 m_buffer[(x + y * WIDTH) * 2 + 1] = color >> 8;
267 #endif // DOXYGEN_SHOULD_SKIP_THIS 273 #endif // CONFIG_ADAFRUIT_GFX_ENABLE AdafruitCanvasOps(lcduint_t w, lcduint_t h, uint8_t *buffer)
Initializes canvas, based on Adafruit GFX.
uint8_t lcduint_t
internal int type, used by the library.
void setOffset(lcdint_t ox, lcdint_t oy)
Sets offset.
This is basic template class for all canvas classes, based on Adafruit_GFX.
int8_t lcdint_t
internal int type, used by the library.
SSD1306 HAL IO communication functions.
AdafruitCanvas1 represents objects for drawing in memory buffer AdafruitCanvas1 represents each pixel...
AdafruitCanvas16 represents objects for drawing in memory buffer AdafruitCanvas16 represents each pix...
lcdint_t y
y position in pixels
Base class for all AdafruitCanvas childs.
#define canvas_swap_data(a, b, type)
swaps content of a and b variables of type type
AdafruitCanvas8 represents objects for drawing in memory buffer AdafruitCanvas8 represents each pixel...
uint8_t * m_buffer
pixels buffer
Basic structures of nano gfx library.
static const uint8_t BITS_PER_PIXEL
number of bits per single pixel in buffer
lcdint_t x
x position in pixels
void drawPixel(int16_t x, int16_t y, uint16_t color) override
draw single pixel in canvas area
NanoPoint offset
Fixed offset for all operation of NanoCanvasOps in pixels.