libDaisy
Hardware Library for Daisy
Loading...
Searching...
No Matches
daisy::OledColorDisplay< DisplayDriver > Class Template Reference

Detailed Description

template<typename DisplayDriver>
class daisy::OledColorDisplay< DisplayDriver >

This class is for drawing to a monochrome OLED display.

#include <oled_color_display.h>

Inheritance diagram for daisy::OledColorDisplay< DisplayDriver >:
daisy::ColorGraphicsDisplayImpl< OledColorDisplay< DisplayDriver > > daisy::ColorGraphicsDisplay

Classes

struct  Config
 

Public Member Functions

 OledColorDisplay ()
 
virtual ~OledColorDisplay ()
 
void Init (Config config)
 
uint16_t Height () const override
 
uint16_t Width () const override
 
void Fill (bool on) override
 
void DrawPixel (uint_fast8_t x, uint_fast8_t y, bool on) override
 
void SetColorFG (uint8_t red, uint8_t green, uint8_t blue)
 
void SetColorBG (uint8_t red, uint8_t green, uint8_t blue)
 
void Update () override
 
- Public Member Functions inherited from daisy::ColorGraphicsDisplayImpl< OledColorDisplay< DisplayDriver > >
 ColorGraphicsDisplayImpl ()
 
virtual ~ColorGraphicsDisplayImpl ()
 
void DrawLine (uint_fast8_t x1, uint_fast8_t y1, uint_fast8_t x2, uint_fast8_t y2, bool on) override
 
void DrawRect (uint_fast8_t x1, uint_fast8_t y1, uint_fast8_t x2, uint_fast8_t y2, bool on, bool fill=false) override
 
void DrawArc (uint_fast8_t x, uint_fast8_t y, uint_fast8_t radius, int_fast16_t start_angle, int_fast16_t sweep, bool on) override
 
char WriteChar (char ch, FontDef font, bool on) override
 
char WriteString (const char *str, FontDef font, bool on) override
 
Rectangle WriteStringAligned (const char *str, const FontDef &font, Rectangle boundingBox, Alignment alignment, bool on) override
 
- Public Member Functions inherited from daisy::ColorGraphicsDisplay
 ColorGraphicsDisplay ()
 
virtual ~ColorGraphicsDisplay ()
 
Rectangle GetBounds () const
 
size_t CurrentX ()
 
size_t CurrentY ()
 
void DrawRect (const Rectangle &rect, bool on, bool fill=false)
 
void DrawCircle (uint_fast8_t x, uint_fast8_t y, uint_fast8_t radius, bool on)
 
void SetCursor (uint16_t x, uint16_t y)
 

Additional Inherited Members

- Protected Attributes inherited from daisy::ColorGraphicsDisplay
uint16_t currentX_
 
uint16_t currentY_
 

Constructor & Destructor Documentation

◆ OledColorDisplay()

template<typename DisplayDriver >
daisy::OledColorDisplay< DisplayDriver >::OledColorDisplay ( )
inline

◆ ~OledColorDisplay()

Member Function Documentation

◆ DrawPixel()

template<typename DisplayDriver >
void daisy::OledColorDisplay< DisplayDriver >::DrawPixel ( uint_fast8_t  x,
uint_fast8_t  y,
bool  on 
)
inlineoverridevirtual

Sets the pixel at the specified coordinate to be on/off.

Parameters
xx Coordinate
yy coordinate
onon or off

Implements daisy::ColorGraphicsDisplay.

◆ Fill()

template<typename DisplayDriver >
void daisy::OledColorDisplay< DisplayDriver >::Fill ( bool  on)
inlineoverridevirtual

Fills the entire display with either on/off.

Parameters
onSets on or off.

Implements daisy::ColorGraphicsDisplay.

◆ Height()

template<typename DisplayDriver >
uint16_t daisy::OledColorDisplay< DisplayDriver >::Height ( ) const
inlineoverridevirtual

◆ Init()

template<typename DisplayDriver >
void daisy::OledColorDisplay< DisplayDriver >::Init ( Config  config)
inline

◆ SetColorBG()

template<typename DisplayDriver >
void daisy::OledColorDisplay< DisplayDriver >::SetColorBG ( uint8_t  red,
uint8_t  green,
uint8_t  blue 
)
inlinevirtual

Set background color

Parameters
redRed color
greenGreen color
blueBlue color

Implements daisy::ColorGraphicsDisplay.

◆ SetColorFG()

template<typename DisplayDriver >
void daisy::OledColorDisplay< DisplayDriver >::SetColorFG ( uint8_t  red,
uint8_t  green,
uint8_t  blue 
)
inlinevirtual

Set foreground color

Parameters
redRed color
greenGreen color
blueBlue color

Implements daisy::ColorGraphicsDisplay.

◆ Update()

template<typename DisplayDriver >
void daisy::OledColorDisplay< DisplayDriver >::Update ( )
inlineoverridevirtual

Writes the current display buffer to the OLED device using SPI or I2C depending on how the object was initialized.

Implements daisy::ColorGraphicsDisplay.

◆ Width()

template<typename DisplayDriver >
uint16_t daisy::OledColorDisplay< DisplayDriver >::Width ( ) const
inlineoverridevirtual

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