29 #ifndef _NANO_ENGINE_TILER_H_ 30 #define _NANO_ENGINE_TILER_H_ 43 #define BUFFER_128x64_MONO NanoCanvas1, 128, 64, 7 44 #define TILE_8x8_RGB16 NanoCanvas16, 8, 8, 3 45 #define TILE_8x8_RGB8 NanoCanvas8, 8, 8, 3 46 #define TILE_8x8_MONO NanoCanvas1, 8, 8, 3 60 template<
class C, u
int8_t W, u
int8_t H, u
int8_t B>
103 if ((point.
y<0) || ((point.
y>>B)>=NE_MAX_TILES_NUM))
return;
116 y2 =
min((y2>>B), NE_MAX_TILES_NUM - 1);
117 for (uint8_t y=y1; y<=y2; y++)
119 for(uint8_t x=x1>>B; x<=(x2>>B); x++)
171 static uint8_t m_buffer[W * H * C::BITS_PER_PIXEL / 8];
174 template<
class C, u
int8_t W, u
int8_t H, u
int8_t B>
177 template<
class C, u
int8_t W, u
int8_t H, u
int8_t B>
180 template<
class C, u
int8_t W, u
int8_t H, u
int8_t B>
183 template<
class C, u
int8_t W, u
int8_t H, u
int8_t B>
186 template<
class C, u
int8_t W, u
int8_t H, u
int8_t B>
210 template<
class C, u
int8_t W, u
int8_t H, u
int8_t B>
231 canvas.printFixed( textPos.
x, textPos.
y, msg);
static const uint8_t NE_TILE_SIZE_BITS
static void refresh(const NanoPoint &point)
#define RGB_COLOR8(r, g, b)
SFixedFontInfo s_fixedFont
static bool collision(NanoPoint &p, NanoRect &rect)
Returns true if point is inside the rectangle area. Returns true if point is inside the rectangle are...
ssd1306_lcd_t ssd1306_lcd
static void refresh(const NanoRect &rect)
static void drawCallback(TNanoEngineOnDraw callback)
uint8_t width
width in pixels
static const uint8_t NE_TILE_HEIGHT
static void displayBuffer()
refreshes content on oled display. Refreshes content on oled display. Call it, if you want to update ...
bool collision(const NanoPoint &p) const
static void displayPopup(const char *msg)
prints popup message over display content prints popup message over display content ...
static TNanoEngineOnDraw m_onDraw
static void refresh(lcdint_t x1, lcdint_t y1, lcdint_t x2, lcdint_t y2)
bool(* TNanoEngineOnDraw)(void)
static const uint8_t NE_MAX_TILES_NUM
static uint16_t m_refreshFlags[NE_MAX_TILES_NUM]
static const uint8_t NE_TILE_WIDTH