Class daisy::OneBitGraphicsDisplay¶
ClassList > daisy > OneBitGraphicsDisplay
#include <display.h>
Inherited by the following classes: daisy::OneBitGraphicsDisplayImpl, daisy::OneBitGraphicsDisplayImpl, daisy::OneBitGraphicsDisplayImpl
Public Functions¶
Protected Attributes¶
| Type | Name |
|---|---|
| uint16_t | currentX_ |
| uint16_t | currentY_ |
Detailed Description¶
This interface is used as a base class for all types of 1bit-per-pixel graphics displays.
Public Functions Documentation¶
function CurrentX¶
function CurrentY¶
function DrawArc¶
virtual void daisy::OneBitGraphicsDisplay::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::OneBitGraphicsDisplay::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::OneBitGraphicsDisplay::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¶
virtual void daisy::OneBitGraphicsDisplay::DrawPixel (
uint_fast8_t x,
uint_fast8_t y,
bool on
) = 0
Sets the pixel at the specified coordinate to be on/off.
Parameters:
xx Coordinateyy coordinateonon or off
function DrawRect [½]¶
virtual void daisy::OneBitGraphicsDisplay::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::OneBitGraphicsDisplay::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 OneBitGraphicsDisplay¶
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 UpdateFinished¶
Returns true if the Update has finished, used for chained DMA transfers
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::OneBitGraphicsDisplay::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::OneBitGraphicsDisplay::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 ~OneBitGraphicsDisplay¶
Protected Attributes Documentation¶
variable currentX_¶
variable currentY_¶
The documentation for this class was generated from the following file external-docs/libDaisy/src/hid/disp/display.h