8#define deg2rad(deg) ((deg)*3.141592 / 180.0)
228template <
class ChildType>
276 bool fill =
false)
override
284 ((
ChildType*)(
this))->ChildType::DrawPixel(x, y,
on);
381 ->ChildType::DrawPixel(x -
t_x, y +
t_y,
on);
384 ->ChildType::DrawPixel(x +
t_x, y +
t_y,
on);
387 ->ChildType::DrawPixel(x +
t_x, y -
t_y,
on);
390 ->ChildType::DrawPixel(x -
t_x, y -
t_y,
on);
427 for(
i = 0;
i <
font.FontHeight;
i++)
430 for(
j = 0;
j <
font.FontWidth;
j++)
432 if((
b <<
j) & 0x8000)
435 ->ChildType::DrawPixel(
441 ->ChildType::DrawPixel(
491 while(*
string++ !=
'\0')
496 Rectangle GetTextRect(
const char* text,
const FontDef& font)
498 const auto numChars = strlen(text);
Definition color_display.h:18
virtual Rectangle WriteStringAligned(const char *str, const FontDef &font, Rectangle boundingBox, Alignment alignment, bool on)=0
virtual void DrawPixel(uint_fast8_t x, uint_fast8_t y, bool on)=0
Rectangle GetBounds() const
Definition color_display.h:26
virtual uint16_t Width() const =0
uint16_t currentY_
Definition color_display.h:199
virtual char WriteChar(char ch, FontDef font, bool on)=0
virtual char WriteString(const char *str, FontDef font, bool on)=0
void DrawCircle(uint_fast8_t x, uint_fast8_t y, uint_fast8_t radius, bool on)
Definition color_display.h:138
size_t CurrentY()
Definition color_display.h:33
virtual uint16_t Height() const =0
size_t CurrentX()
Definition color_display.h:32
virtual void DrawLine(uint_fast8_t x1, uint_fast8_t y1, uint_fast8_t x2, uint_fast8_t y2, bool on)=0
virtual void SetColorBG(uint8_t red, uint8_t green, uint8_t blue)=0
ColorGraphicsDisplay()
Definition color_display.h:20
void SetCursor(uint16_t x, uint16_t y)
Definition color_display.h:185
virtual ~ColorGraphicsDisplay()
Definition color_display.h:21
virtual void Fill(bool on)=0
uint16_t currentX_
Definition color_display.h:198
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
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
virtual void SetColorFG(uint8_t red, uint8_t green, uint8_t blue)=0
void DrawRect(const Rectangle &rect, bool on, bool fill=false)
Definition color_display.h:103
Definition color_display.h:230
char WriteString(const char *str, FontDef font, bool on) override
Definition color_display.h:454
void DrawLine(uint_fast8_t x1, uint_fast8_t y1, uint_fast8_t x2, uint_fast8_t y2, bool on) override
Definition color_display.h:235
void DrawRect(uint_fast8_t x1, uint_fast8_t y1, uint_fast8_t x2, uint_fast8_t y2, bool on, bool fill=false) override
Definition color_display.h:271
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
Definition color_display.h:297
Rectangle WriteStringAligned(const char *str, const FontDef &font, Rectangle boundingBox, Alignment alignment, bool on) override
Definition color_display.h:474
ColorGraphicsDisplayImpl()
Definition color_display.h:232
char WriteChar(char ch, FontDef font, bool on) override
Definition color_display.h:410
virtual ~ColorGraphicsDisplayImpl()
Definition color_display.h:233
Definition leddriver.h:33
Definition graphics_common.h:22
Rectangle AlignedWithin(const Rectangle &other, Alignment alignment) const
Definition graphics_common.h:209
#define deg2rad(deg)
Definition color_display.h:8
Hardware defines and helpers for daisy field platform.
Definition index.h:2
Alignment
Definition graphics_common.h:9
Definition oled_fonts.h:17
uint8_t FontHeight
Definition oled_fonts.h:19
const uint8_t FontWidth
Definition oled_fonts.h:18