LCDGFX LCD display driver  1.2.0
Lightweight graphics library for SSD1306, SSD1325, SSD1327, SSD1331, SSD1351, SH1106, SH1107, IL9163, ST7735, ST7789, ILI9341, PCD8544 displays over I2C/SPI
AdafruitCanvasOps< BPP > Class Template Reference

This is basic template class for all canvas classes, based on Adafruit_GFX. More...

#include <adafruit.h>

Inheritance diagram for AdafruitCanvasOps< BPP >:
Collaboration diagram for AdafruitCanvasOps< BPP >:

Public Member Functions

 AdafruitCanvasOps (lcduint_t w, lcduint_t h, uint8_t *buffer)
 Initializes canvas, based on Adafruit GFX. More...
 
void drawPixel (int16_t x, int16_t y, uint16_t color) override
 draw single pixel in canvas area More...
 
void setOffset (lcdint_t ox, lcdint_t oy)
 Sets offset. More...
 

Public Attributes

NanoPoint offset
 Fixed offset for all operation of NanoCanvasOps in pixels. More...
 

Static Public Attributes

static const uint8_t BITS_PER_PIXEL = BPP
 number of bits per single pixel in buffer
 

Protected Attributes

uint8_t * m_buffer
 pixels buffer
 

Detailed Description

template<uint8_t BPP>
class AdafruitCanvasOps< BPP >

This is basic template class for all canvas classes, based on Adafruit_GFX.

This base class provides functionality compatible with native NanoCanvas implementation of the library

Definition at line 67 of file adafruit.h.

Constructor & Destructor Documentation

◆ AdafruitCanvasOps()

template<uint8_t BPP>
AdafruitCanvasOps< BPP >::AdafruitCanvasOps ( lcduint_t  w,
lcduint_t  h,
uint8_t *  buffer 
)
inline

Initializes canvas, based on Adafruit GFX.

Parameters
wwidth of canvas
hheight of canvas area
bufferbuffer to use for pixels
Note
the size of buffer must be enough to store (w*h*bpp/8) bytes.

Definition at line 84 of file adafruit.h.

Member Function Documentation

◆ drawPixel()

template<uint8_t BPP>
void AdafruitCanvasOps< BPP >::drawPixel ( int16_t  x,
int16_t  y,
uint16_t  color 
)
override

draw single pixel in canvas area

Parameters
xx position
yy position
colorcolor of pixel: for monochrome it can be 0 (black), 1 (white), 2 (invert)

◆ setOffset()

template<uint8_t BPP>
void AdafruitCanvasOps< BPP >::setOffset ( lcdint_t  ox,
lcdint_t  oy 
)
inline

Sets offset.

Parameters
ox- X offset in pixels
oy- Y offset in pixels

Definition at line 106 of file adafruit.h.

Member Data Documentation

◆ offset

template<uint8_t BPP>
NanoPoint AdafruitCanvasOps< BPP >::offset

Fixed offset for all operation of NanoCanvasOps in pixels.

Definition at line 71 of file adafruit.h.


The documentation for this class was generated from the following file: