|
| Display ()=default |
| Comstruct a display instance.
|
|
void | set_draw_mode (const DRAW_MODE &mode) |
| Set draw mode (color, pixel op) to use for next calls to drawing primitives. More...
|
|
void | set_fill_mode (const DRAW_MODE &mode) |
| Set fill mode (color, pixel op) to use for next calls to drawing primitives (for closed surfaces only). More...
|
|
void | set_font (const FONT &font) |
| Set the new font to use for next calls to text drawing perimitives. More...
|
|
Error | last_error () const |
| Error code of latest called drawing primitive. More...
|
|
void | erase () |
| Erase complete display. More...
|
|
void | draw_char (POINT point, char value) |
| Draw one character at the given display location. More...
|
|
void | draw_string (POINT point, const char *content) |
| Draw a string of characters at the given display location. More...
|
|
void | draw_string (POINT point, const flash::FlashStorage *content) |
| Draw a string of characters at the given display location. More...
|
|
void | draw_point (POINT point) |
| Draw a pixel at given coordinate. More...
|
|
void | draw_line (POINT point1, POINT point2) |
| Draw a line between 2 points, at given coordinates. More...
|
|
void | draw_rectangle (POINT point1, POINT point2) |
| Draw a rectangle defined by 2 corner points, at given coordinates. More...
|
|
void | draw_rounded_rectangle (POINT point1, POINT point2, SCALAR radius) |
| Draw a rounded rectangle defined by 2 corner points, at given coordinates, and the radius of circle arcs drawn at each corner. More...
|
|
void | draw_circle (POINT center, SCALAR radius) |
| Draw a circle defined by its center, at given coordinates, and its radius. More...
|
|
void | draw_polyline (std::initializer_list< POINT > points) |
| Draw lines between consecutive points in the provided list. More...
|
|
void | draw_polygon (std::initializer_list< POINT > points) |
| Draw a polygon (closed surface) with lines between consecutive points in the provided list. More...
|
|
template<typename F > |
void | draw_bitmap (POINT origin, POINT size, F input_streamer) |
| Draw a bitmap onto the display device. More...
|
|
void | update () |
| For display devices having a raster buffer, this method copies invalid (modified) parts of the raster buffer to the device. More...
|
|
void | force_update () |
| For display devices having a raster buffer, this method copies the whole raster buffer to the device. More...
|
|
template<typename DISPLAY_DEVICE>
class devices::display::Display< DISPLAY_DEVICE >
Class handling drawing primitives on any display device.
Tha driver for the actual display device is provided by the template argument DISPLAY_DEVICE
. Display
supports devices with or without a raster buffer.
- Warning
- if
DISPLAY_DEVICE
uses a raster buffer, then drawing primitives never display anything until you call update()
.
Drawing primitives calls may generate various errors and possibly have no impact on display. Errors may be checked after each drawing primitive call, through last_error()
call.
- Template Parameters
-
DISPLAY_DEVICE | real display device class, must subclass AbstractDisplay |
Definition at line 434 of file display.h.
template<typename DISPLAY_DEVICE >
Draw a bitmap onto the display device.
No clipping is performed, bitmap must be fully displayable at origin
, otherwise an error willl occur and nothing wil be drawn.
Bitmap content is made of a sequence of bytes, each byte representing 8 horizontal pixels:
- each
1
pixel will be drawn with current outline mode, as set with set_draw_mode()
- each
0
pixel will be drawn with current filling mode, as set with set_fill_mode()
- Template Parameters
-
F | Functor class which instance input_streamer will be used to read bitmap byte after byte; class should be able to read bitmap bytes wherever they are (Flash memore, SD card...) |
- Parameters
-
origin | the point at which the top left corner of the bitmap shall be displayed |
size | the size of the bitmap to diaply |
input_streamer | a functor instance that will be called repeatedly for each bitmap byte, from the first to the last |
- See also
- flash::FlashReader
Definition at line 854 of file display.h.
template<typename DISPLAY_DEVICE >
For display devices having a raster buffer, this method copies invalid (modified) parts of the raster buffer to the device.
For such devices, nothing will get actually drawn until update()
is called.
This is useless for devices with direct draw to device (no raster buffer).
Definition at line 906 of file display.h.