29 #ifndef _NANO_CANVAS_H_ 30 #define _NANO_CANVAS_H_ 45 CANVAS_MODE_BASIC = 0x00,
58 template <u
int8_t BPP>
102 void begin(lcdint_t w, lcdint_t h, uint8_t *bytes);
109 void setOffset(lcdint_t ox, lcdint_t oy) { offset.
x = ox; offset.
y = oy; };
135 void putPixel(lcdint_t x, lcdint_t y);
151 void drawVLine(lcdint_t x1, lcdint_t y1, lcdint_t y2);
160 void drawHLine(lcdint_t x1, lcdint_t y1, lcdint_t x2);
170 void drawLine(lcdint_t x1, lcdint_t y1, lcdint_t x2, lcdint_t y2);
187 void drawRect(lcdint_t x1, lcdint_t y1, lcdint_t x2, lcdint_t y2);
204 void fillRect(lcdint_t x1, lcdint_t y1, lcdint_t x2, lcdint_t y2);
229 void drawBitmap1(lcdint_t x, lcdint_t y, lcduint_t w, lcduint_t h,
const uint8_t *bitmap);
247 void drawXBitmap1(lcdint_t x, lcdint_t y, lcduint_t w, lcduint_t h,
const uint8_t *bitmap);
258 void drawBitmap8(lcdint_t x, lcdint_t y, lcduint_t w, lcduint_t h,
const uint8_t *bitmap);
269 size_t write(uint8_t c)
override;
330 template <u
int8_t BPP>
341 virtual void blt(lcdint_t x, lcdint_t y) = 0;
346 virtual void blt() = 0;
382 using NanoCanvasBase::NanoCanvasBase;
389 void blt(lcdint_t x, lcdint_t y)
override;
418 using NanoCanvasBase::NanoCanvasBase;
425 void blt(lcdint_t x, lcdint_t y)
override;
454 using NanoCanvasBase::NanoCanvasBase;
461 void blt(lcdint_t x, lcdint_t y)
override;
496 using NanoCanvasBase::NanoCanvasBase;
503 void blt(lcdint_t x, lcdint_t y)
override;
538 using NanoCanvasBase::NanoCanvasBase;
545 void blt(lcdint_t x, lcdint_t y)
override;
580 using NanoCanvasBase::NanoCanvasBase;
587 void blt(lcdint_t x, lcdint_t y)
override;
const NanoPoint offsetEnd() const
void drawBitmap8(lcdint_t x, lcdint_t y, lcduint_t w, lcduint_t h, const uint8_t *bitmap)
Draws 8-bit color bitmap in color buffer. Draws 8-bit color bitmap in color buffer.
void drawLine(lcdint_t x1, lcdint_t y1, lcdint_t x2, lcdint_t y2)
void drawBitmap1(lcdint_t x, lcdint_t y, lcduint_t w, lcduint_t h, const uint8_t *bitmap)
Draws monochrome bitmap in color buffer using color, specified via setColor() method Draws monochrome...
struct _NanoPoint NanoPoint
void drawVLine(lcdint_t x1, lcdint_t y1, lcdint_t y2)
lcdint_t m_cursorX
current X cursor position for text output
lcduint_t m_p
number of bits, used by width value: 3 equals to 8 pixels width
NanoCanvasOps(lcdint_t w, lcdint_t h, uint8_t *bytes)
void putPixel(lcdint_t x, lcdint_t y)
static const uint8_t BITS_PER_PIXEL
void setColor(uint16_t color)
void printFixed(lcdint_t xpos, lcdint_t y, const char *ch, EFontStyle style=STYLE_NORMAL)
uint8_t * m_buf
Canvas data.
void drawXBitmap1(lcdint_t x, lcdint_t y, lcduint_t w, lcduint_t h, const uint8_t *bitmap)
Draws monochrome bitmap in color buffer using color, specified via setColor() method Draws monochrome...
lcdint_t m_cursorY
current Y cursor position for text output
void drawHLine(lcdint_t x1, lcdint_t y1, lcdint_t x2)
void printFixedPgm(lcdint_t xpos, lcdint_t y, const char *ch, EFontStyle style=STYLE_NORMAL)
void setOffset(lcdint_t ox, lcdint_t oy)
EFontStyle m_fontStyle
currently active font style
void setMode(uint8_t modeFlags)
Sets canvas drawing mode Sets canvas drawing mode. The set flags define transparency of output images...
void begin(lcdint_t w, lcdint_t h, uint8_t *bytes)
void fillRect(lcdint_t x1, lcdint_t y1, lcdint_t x2, lcdint_t y2)
uint16_t m_color
current color for monochrome operations
const NanoRect rect() const
size_t write(uint8_t c) override
lcduint_t m_w
width of NanoCanvas area in pixels
void drawRect(lcdint_t x1, lcdint_t y1, lcdint_t x2, lcdint_t y2)
uint8_t printChar(uint8_t c)
lcduint_t m_h
height of NanoCanvas area in pixels
uint8_t m_textMode
Flags for current NanoCanvas mode.