Class daisy::ColorGraphicsDisplay¶
ClassList > daisy > ColorGraphicsDisplay
#include <color_display.h>
Inherited by the following classes: daisy::ColorGraphicsDisplayImpl, daisy::ColorGraphicsDisplayImpl
Public Functions¶
Protected Attributes¶
| Type | Name |
|---|---|
| uint16_t | currentX_ |
| uint16_t | currentY_ |
Detailed Description¶
This interface is used as a base class for color graphics displays.
Public Functions Documentation¶
function ColorGraphicsDisplay¶
function CurrentX¶
function CurrentY¶
function DrawArc¶
virtual void daisy::ColorGraphicsDisplay::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
Draws an arc around the specified coordinate
Parameters:
xx Coordinate of the center of the arcyy Coordinate of the center of the arcradiusradius of the arcstart_angleangle where to start the arcsweeptotal angle of the arconon or off
function DrawCircle¶
inline void daisy::ColorGraphicsDisplay::DrawCircle (
uint_fast8_t x,
uint_fast8_t y,
uint_fast8_t radius,
bool on
)
Draws a circle around the specified coordinate
Parameters:
xx Coordinate of the center of the circleyy Coordinate of the center of the circleradiusradius of the circleonon or off
function DrawLine¶
virtual void daisy::ColorGraphicsDisplay::DrawLine (
uint_fast8_t x1,
uint_fast8_t y1,
uint_fast8_t x2,
uint_fast8_t y2,
bool on
) = 0
Draws a line from (x1, y1) to (y1, y2)
Parameters:
x1x Coordinate of the starting pointy1y Coordinate of the starting pointx2x Coordinate of the ending pointy2y Coordinate of the ending pointonon or off
function DrawPixel¶
Sets the pixel at the specified coordinate to be on/off.
Parameters:
xx Coordinateyy coordinateonon or off
function DrawRect [½]¶
virtual void daisy::ColorGraphicsDisplay::DrawRect (
uint_fast8_t x1,
uint_fast8_t y1,
uint_fast8_t x2,
uint_fast8_t y2,
bool on,
bool fill=false
) = 0
Draws a rectangle based on two coordinates.
Parameters:
x1x Coordinate of the first pointy1y Coordinate of the first pointx2x Coordinate of the second pointy2y Coordinate of the second pointonon or offfillfill the rectangle or draw only the outline
function DrawRect [2/2]¶
inline void daisy::ColorGraphicsDisplay::DrawRect (
const Rectangle & rect,
bool on,
bool fill=false
)
Draws a rectangle.
Parameters:
rectthe rectangleonon or offfillfill the rectangle or draw only the outline
function Fill¶
Fills the entire display with either on/off.
Parameters:
onSets on or off.
function GetBounds¶
function Height¶
function SetColorBG¶
virtual void daisy::ColorGraphicsDisplay::SetColorBG (
uint8_t red,
uint8_t green,
uint8_t blue
) = 0
Set background color
Parameters:
redRed colorgreenGreen colorblueBlue color
function SetColorFG¶
virtual void daisy::ColorGraphicsDisplay::SetColorFG (
uint8_t red,
uint8_t green,
uint8_t blue
) = 0
Set foreground color
Parameters:
redRed colorgreenGreen colorblueBlue color
function SetCursor¶
Moves the 'Cursor' position used for WriteChar, and WriteStr to the specified coordinate.
Parameters:
xx posyy pos
function Update¶
Writes the current display buffer to the OLED device using SPI or I2C depending on how the object was initialized.
function Width¶
function WriteChar¶
Writes the character with the specific FontDef to the display buffer at the current Cursor position.
Parameters:
chcharacter to be writtenfontfont to be written inonon or off
Returns:
&
function WriteString¶
virtual char daisy::ColorGraphicsDisplay::WriteString (
const char * str,
FontDef font,
bool on
) = 0
Similar to WriteChar, except it will handle an entire String. Wrapping does not happen automatically, so the width of the string must be kept within the dimensions of the screen.
Parameters:
strstring to be writtenfontfont to useonon or off
Returns:
&
function WriteStringAligned¶
virtual Rectangle daisy::ColorGraphicsDisplay::WriteStringAligned (
const char * str,
const FontDef & font,
Rectangle boundingBox,
Alignment alignment,
bool on
) = 0
Similar to WriteString but justified within a bounding box.
Parameters:
strstring to be writtenfontfont to useboundingBoxthe bounding box to draw the text inalignmentthe alignment to useonon or off
Returns:
The rectangle that was drawn to
function ~ColorGraphicsDisplay¶
Protected Attributes Documentation¶
variable currentX_¶
variable currentY_¶
The documentation for this class was generated from the following file external-docs/libDaisy/src/hid/disp/color_display.h