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:
x
x Coordinate of the center of the arcy
y Coordinate of the center of the arcradius
radius of the arcstart_angle
angle where to start the arcsweep
total angle of the arcon
on 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:
x
x Coordinate of the center of the circley
y Coordinate of the center of the circleradius
radius of the circleon
on 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:
x1
x Coordinate of the starting pointy1
y Coordinate of the starting pointx2
x Coordinate of the ending pointy2
y Coordinate of the ending pointon
on or off
function DrawPixel¶
Sets the pixel at the specified coordinate to be on/off.
Parameters:
x
x Coordinatey
y coordinateon
on 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:
x1
x Coordinate of the first pointy1
y Coordinate of the first pointx2
x Coordinate of the second pointy2
y Coordinate of the second pointon
on or offfill
fill 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:
rect
the rectangleon
on or offfill
fill the rectangle or draw only the outline
function Fill¶
Fills the entire display with either on/off.
Parameters:
on
Sets 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:
red
Red colorgreen
Green colorblue
Blue color
function SetColorFG¶
virtual void daisy::ColorGraphicsDisplay::SetColorFG (
uint8_t red,
uint8_t green,
uint8_t blue
) = 0
Set foreground color
Parameters:
red
Red colorgreen
Green colorblue
Blue color
function SetCursor¶
Moves the 'Cursor' position used for WriteChar, and WriteStr to the specified coordinate.
Parameters:
x
x posy
y 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:
ch
character to be writtenfont
font to be written inon
on 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:
str
string to be writtenfont
font to useon
on 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:
str
string to be writtenfont
font to useboundingBox
the bounding box to draw the text inalignment
the alignment to useon
on 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