SSD1306 OLED display driver  1.8.2
This library is developed to control SSD1306/SSD1331/SSD1351/IL9163/PCD8554 RGB i2c/spi LED displays
Public Member Functions | Public Attributes | Static Public Attributes | Protected Attributes | List of all members
AdafruitCanvasOps< BPP > Class Template Reference

#include <adafruit.h>

Inheritance diagram for AdafruitCanvasOps< BPP >:
AdafruitCanvasBase< BPP > AdafruitCanvasBase< 1 > AdafruitCanvasBase< 16 > AdafruitCanvasBase< 8 > AdafruitCanvas1 AdafruitCanvas16 AdafruitCanvas8

Public Member Functions

 AdafruitCanvasOps (lcduint_t w, lcduint_t h, uint8_t *buffer)
 
void drawPixel (int16_t x, int16_t y, uint16_t color) override
 
void setOffset (lcdint_t ox, lcdint_t oy)
 

Public Attributes

NanoPoint offset
 

Static Public Attributes

static const uint8_t BITS_PER_PIXEL = BPP
 

Protected Attributes

uint8_t * m_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 ssd1306 library

Definition at line 71 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 88 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 110 of file adafruit.h.

Member Data Documentation

◆ BITS_PER_PIXEL

template<uint8_t BPP>
const uint8_t AdafruitCanvasOps< BPP >::BITS_PER_PIXEL = BPP
static

number of bits per single pixel in buffer

Definition at line 78 of file adafruit.h.

◆ m_buffer

template<uint8_t BPP>
uint8_t* AdafruitCanvasOps< BPP >::m_buffer
protected

pixels buffer

Definition at line 110 of file adafruit.h.

◆ offset

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

Fixed offset for all operation of NanoCanvasOps in pixels.

Definition at line 75 of file adafruit.h.


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