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>
85 for(uint8_t i=0; i<NanoEngineTiler<C,W,H,B>::NE_MAX_TILES_NUM; i++)
106 if ((point.
y<0) || ((point.
y>>B)>=NE_MAX_TILES_NUM))
return;
117 y2 =
min((y2>>B), NE_MAX_TILES_NUM - 1);
118 for(uint8_t y=y1; y<=y2; y++)
120 for(uint8_t x=
max(0,(x1>>B)); x<=(x2>>B); x++)
172 static uint8_t m_buffer[W * H * C::BITS_PER_PIXEL / 8];
175 template<
class C, u
int8_t W, u
int8_t H, u
int8_t B>
178 template<
class C, u
int8_t W, u
int8_t H, u
int8_t B>
181 template<
class C, u
int8_t W, u
int8_t H, u
int8_t B>
184 template<
class C, u
int8_t W, u
int8_t H, u
int8_t B>
187 template<
class C, u
int8_t W, u
int8_t H, u
int8_t B>
211 template<
class C, u
int8_t W, u
int8_t H, u
int8_t B>
232 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...
bool collision(const NanoPoint &p) const
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 ...
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