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

Detailed Description

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

This class is for drawing to a monochrome OLED display.

#include <oled_display.h>

Inheritance diagram for daisy::OledDisplay< DisplayDriver >:
daisy::OneBitGraphicsDisplayImpl< OledDisplay< DisplayDriver > > daisy::OneBitGraphicsDisplay

Classes

struct  Config
 

Public Member Functions

 OledDisplay ()
 
virtual ~OledDisplay ()
 
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 Update () override
 
- Public Member Functions inherited from daisy::OneBitGraphicsDisplayImpl< OledDisplay< DisplayDriver > >
 OneBitGraphicsDisplayImpl ()
 
virtual ~OneBitGraphicsDisplayImpl ()
 
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::OneBitGraphicsDisplay
 OneBitGraphicsDisplay ()
 
virtual ~OneBitGraphicsDisplay ()
 
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::OneBitGraphicsDisplay
uint16_t currentX_
 
uint16_t currentY_
 

Constructor & Destructor Documentation

◆ OledDisplay()

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

◆ ~OledDisplay()

Member Function Documentation

◆ DrawPixel()

template<typename DisplayDriver >
void daisy::OledDisplay< 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::OneBitGraphicsDisplay.

◆ Fill()

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

Fills the entire display with either on/off.

Parameters
onSets on or off.

Implements daisy::OneBitGraphicsDisplay.

◆ Height()

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

◆ Init()

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

◆ Update()

template<typename DisplayDriver >
void daisy::OledDisplay< 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::OneBitGraphicsDisplay.

◆ Width()

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

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