Skip to content

Class daisy::OledColorDisplay

template <typename DisplayDriver>

ClassList > daisy > OledColorDisplay

More...

  • #include <oled_color_display.h>

Inherits the following classes: daisy::ColorGraphicsDisplayImpl

Classes

Type Name
struct Config

Public Functions

Type Name
virtual void DrawPixel (uint_fast8_t x, uint_fast8_t y, bool on) override
virtual void Fill (bool on) override
virtual uint16_t Height () override const
void Init (Config config)
OledColorDisplay ()
virtual void SetColorBG (uint8_t red, uint8_t green, uint8_t blue)
virtual void SetColorFG (uint8_t red, uint8_t green, uint8_t blue)
virtual void Update () override
virtual uint16_t Width () override const
virtual ~OledColorDisplay ()

Public Functions inherited from daisy::ColorGraphicsDisplayImpl

See daisy::ColorGraphicsDisplayImpl

Type Name
ColorGraphicsDisplayImpl ()
virtual 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
virtual void DrawLine (uint_fast8_t x1, uint_fast8_t y1, uint_fast8_t x2, uint_fast8_t y2, bool on) override
virtual void DrawRect (uint_fast8_t x1, uint_fast8_t y1, uint_fast8_t x2, uint_fast8_t y2, bool on, bool fill=false) override
virtual char WriteChar (char ch, FontDef font, bool on) override
virtual char WriteString (const char * str, FontDef font, bool on) override
virtual Rectangle WriteStringAligned (const char * str, const FontDef & font, Rectangle boundingBox, Alignment alignment, bool on) override
virtual ~ColorGraphicsDisplayImpl ()

Public Functions inherited from daisy::ColorGraphicsDisplay

See daisy::ColorGraphicsDisplay

Type Name
ColorGraphicsDisplay ()
size_t CurrentX ()
size_t CurrentY ()
virtual 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) = 0
void DrawCircle (uint_fast8_t x, uint_fast8_t y, uint_fast8_t radius, bool on)
virtual void DrawLine (uint_fast8_t x1, uint_fast8_t y1, uint_fast8_t x2, uint_fast8_t y2, bool on) = 0
virtual void DrawPixel (uint_fast8_t x, uint_fast8_t y, bool on) = 0
virtual void DrawRect (uint_fast8_t x1, uint_fast8_t y1, uint_fast8_t x2, uint_fast8_t y2, bool on, bool fill=false) = 0
void DrawRect (const Rectangle & rect, bool on, bool fill=false)
virtual void Fill (bool on) = 0
Rectangle GetBounds () const
virtual uint16_t Height () const = 0
virtual void SetColorBG (uint8_t red, uint8_t green, uint8_t blue) = 0
virtual void SetColorFG (uint8_t red, uint8_t green, uint8_t blue) = 0
void SetCursor (uint16_t x, uint16_t y)
virtual void Update () = 0
virtual uint16_t Width () const = 0
virtual char WriteChar (char ch, FontDef font, bool on) = 0
virtual char WriteString (const char * str, FontDef font, bool on) = 0
virtual Rectangle WriteStringAligned (const char * str, const FontDef & font, Rectangle boundingBox, Alignment alignment, bool on) = 0
virtual ~ColorGraphicsDisplay ()

Protected Attributes inherited from daisy::ColorGraphicsDisplay

See daisy::ColorGraphicsDisplay

Type Name
uint16_t currentX_
uint16_t currentY_

Detailed Description

This class is for drawing to a monochrome OLED display.

Public Functions Documentation

function DrawPixel

inline virtual void daisy::OledColorDisplay::DrawPixel (
    uint_fast8_t x,
    uint_fast8_t y,
    bool on
) override

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

Parameters:

  • x x Coordinate
  • y y coordinate
  • on on or off

Implements daisy::ColorGraphicsDisplay::DrawPixel


function Fill

inline virtual void daisy::OledColorDisplay::Fill (
    bool on
) override

Fills the entire display with either on/off.

Parameters:

  • on Sets on or off.

Implements daisy::ColorGraphicsDisplay::Fill


function Height

inline virtual uint16_t daisy::OledColorDisplay::Height () override const

Implements daisy::ColorGraphicsDisplay::Height


function Init

inline void daisy::OledColorDisplay::Init (
    Config config
) 

function OledColorDisplay

inline daisy::OledColorDisplay::OledColorDisplay () 

function SetColorBG

inline virtual void daisy::OledColorDisplay::SetColorBG (
    uint8_t red,
    uint8_t green,
    uint8_t blue
) 

Set background color

Parameters:

  • red Red color
  • green Green color
  • blue Blue color

Implements daisy::ColorGraphicsDisplay::SetColorBG


function SetColorFG

inline virtual void daisy::OledColorDisplay::SetColorFG (
    uint8_t red,
    uint8_t green,
    uint8_t blue
) 

Set foreground color

Parameters:

  • red Red color
  • green Green color
  • blue Blue color

Implements daisy::ColorGraphicsDisplay::SetColorFG


function Update

inline virtual void daisy::OledColorDisplay::Update () override

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

Implements daisy::ColorGraphicsDisplay::Update


function Width

inline virtual uint16_t daisy::OledColorDisplay::Width () override const

Implements daisy::ColorGraphicsDisplay::Width


function ~OledColorDisplay

inline virtual daisy::OledColorDisplay::~OledColorDisplay () 


The documentation for this class was generated from the following file external-docs/libDaisy/src/hid/disp/oled_color_display.h