10#define deg2rad(deg) ((deg)*3.141592 / 180.0)
214template <
class ChildType>
262 bool fill =
false)
override
270 ((
ChildType*)(
this))->ChildType::DrawPixel(x, y,
on);
367 ->ChildType::DrawPixel(x -
t_x, y +
t_y,
on);
370 ->ChildType::DrawPixel(x +
t_x, y +
t_y,
on);
373 ->ChildType::DrawPixel(x +
t_x, y -
t_y,
on);
376 ->ChildType::DrawPixel(x -
t_x, y -
t_y,
on);
413 for(
i = 0;
i <
font.FontHeight;
i++)
416 for(
j = 0;
j <
font.FontWidth;
j++)
418 if((
b <<
j) & 0x8000)
421 ->ChildType::DrawPixel(
427 ->ChildType::DrawPixel(
477 while(*
string++ !=
'\0')
482 Rectangle GetTextRect(
const char* text,
const FontDef& font)
484 const auto numChars = strlen(text);
Definition leddriver.h:33
virtual void Fill(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
uint16_t currentY_
Definition display.h:185
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 char WriteChar(char ch, FontDef font, bool on)=0
virtual uint16_t Width() const =0
void DrawRect(const Rectangle &rect, bool on, bool fill=false)
Definition display.h:89
Rectangle GetBounds() const
Definition display.h:28
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
size_t CurrentY()
Definition display.h:35
virtual char WriteString(const char *str, FontDef font, bool on)=0
virtual uint16_t Height() const =0
size_t CurrentX()
Definition display.h:34
virtual Rectangle WriteStringAligned(const char *str, const FontDef &font, Rectangle boundingBox, Alignment alignment, bool on)=0
virtual ~OneBitGraphicsDisplay()
Definition display.h:23
void SetCursor(uint16_t x, uint16_t y)
Definition display.h:171
OneBitGraphicsDisplay()
Definition display.h:22
uint16_t currentX_
Definition display.h:184
void DrawCircle(uint_fast8_t x, uint_fast8_t y, uint_fast8_t radius, bool on)
Definition display.h:124
char WriteString(const char *str, FontDef font, bool on) override
Definition display.h:440
char WriteChar(char ch, FontDef font, bool on) override
Definition display.h:396
OneBitGraphicsDisplayImpl()
Definition display.h:218
virtual ~OneBitGraphicsDisplayImpl()
Definition display.h:219
Rectangle WriteStringAligned(const char *str, const FontDef &font, Rectangle boundingBox, Alignment alignment, bool on) override
Definition display.h:460
void DrawLine(uint_fast8_t x1, uint_fast8_t y1, uint_fast8_t x2, uint_fast8_t y2, bool on) override
Definition display.h:221
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 display.h:283
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 display.h:257
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