This class template is responsible for holding and updating data about areas to be refreshed on LCD display.
More...
|
| void | refresh () |
| | Marks all tiles for update. More...
|
| |
| void | refresh (const NanoRect &rect) |
| | Mark specified area in pixels for redrawing by NanoEngine. More...
|
| |
| void | refresh (const NanoPoint &point) __attribute__((noinline)) |
| | Mark specified area in pixels for redrawing by NanoEngine. More...
|
| |
| void | refresh (lcdint_t x1, lcdint_t y1, lcdint_t x2, lcdint_t y2) __attribute__((noinline)) |
| | Mark specified area in pixels for redrawing by NanoEngine. More...
|
| |
| void | refreshWorld (const NanoRect &rect) |
| | Marks for refresh lcd area, which corresponds to specified rectangle in global (World) coordinates. More...
|
| |
| void | refreshWorld (lcdint_t x1, lcdint_t y1, lcdint_t x2, lcdint_t y2) __attribute__((noinline)) |
| | Marks for refresh lcd area, which corresponds to specified rectangle in global (World) coordinates. More...
|
| |
| void | refreshWorld (const NanoPoint &point) |
| | Marks specified pixel area for redrawing by NanoEngine. More...
|
| |
| void | localCoordinates () |
| | Switches engine canvas to local coordinates system. More...
|
| |
| void | worldCoordinates () |
| | Switches engine canvas to global (World) coordinates system. More...
|
| |
|
void | moveTo (const NanoPoint &position) |
| | Moves engine coordinate to new position (this sets World coordinates offset).
|
| |
|
void | moveToAndRefresh (const NanoPoint &position) |
| | Moves engine coordinate to new position and mark whole display for refresh (this sets World coordinates offset).
|
| |
|
const NanoPoint & | getPosition () const |
| | Returns current World offset.
|
| |
| void | drawCallback (TNanoEngineOnDraw callback) |
| | Sets user-defined draw callback. More...
|
| |
| bool | collision (const NanoPoint &p, const NanoRect &rect) |
| | Returns true if point is inside the rectangle area. More...
|
| |
| void | insert (NanoEngineObject< TilerT > &object) __attribute__((noinline)) |
| | Inserts new NanoEngineObject. More...
|
| |
| void | remove (NanoEngineObject< TilerT > &object) __attribute__((noinline)) |
| | Removes NanoEngineObject from the list, but doesn't destroy the object. More...
|
| |
| void | update () __attribute__((noinline)) |
| | Updates all objects. More...
|
| |
|
C & | getCanvas () |
| | Returns canvas, used by the NanoEngine.
|
| |
|
D & | getDisplay () |
| | Returns reference to display object.
|
| |
template<class C, class D>
class NanoEngineTiler< C, D >
This class template is responsible for holding and updating data about areas to be refreshed on LCD display.
It accepts canvas class, tile width in pixels, tile height in pixels and number of bits in tile width as arguments for the template. For example, for 8x8 8-bit RGB tiles the reference should be NanoEngineTiler<NanoCanvas8,8,8,3>, and 3 bits means 3^2 = 8. If you need to have single big buffer, holding the whole content for monochrome display, you can specify something like this NanoEngineTiler<NanoCanvas1,128,64,7>.
Definition at line 79 of file tiler.h.
template<class C , class D >
refreshes content on oled display.
Refreshes content on oled display. Call it, if you want to update the screen. Engine will update only those areas, which are marked by refresh() methods.
Definition at line 487 of file tiler.h.
template<class C , class D >
Sets user-defined draw callback.
This callback will be called everytime, engine needs to update display content. If user callback returns false, engine will not update that area. You always have a way to find out, which area is being updated by engine via NanoEngine<>::canvas::getOffset() and NanoEngine<>::NE_TILE_SIZE.
- Warning
- By default canvas in the engine is initialized with world coordinates. So graphics object with [0,0] coordinates will be placed at topleft position fo the window pointed by offset property of NanoEngine. But engine supports also local coordinates, if you need to draw some dialog, for example. In this case actual object position depends on current engine offset. Refer to worldCoordinates() and localCoordinates().
- Parameters
-
| callback | - user-defined draw callback. |
- Note
- you can change draw callback anytime you need.
- See also
- worldCoordinates()
-
localCoordinates()
Definition at line 341 of file tiler.h.
template<class C , class D >
Marks for refresh lcd area, which corresponds to specified rectangle in global (World) coordinates.
If engine offset is (0,0), then this function refreshes the same area as refresh().
Definition at line 255 of file tiler.h.