|
EasyGUI
|
Image display widget. More...
Data Structures | |
| struct | gui_image_desc_t |
| Image descriptor structure. More... | |
| struct | gui_image_t |
| Image object structure. More... | |
Functions | |
| gui_handle_p | gui_image_create (gui_id_t id, float x, float y, float width, float height, gui_handle_p parent, gui_widget_evt_fn evt_fn, uint16_t flags) |
| Create new image widget. More... | |
| uint8_t | gui_image_setsource (gui_handle_p h, const gui_image_desc_t *img) |
| Set image source to draw. More... | |
Image display widget.
Image widget can display images of different color depth (ARGB8888, RGB888 or RGB565)
Example code for example above
| gui_handle_p gui_image_create | ( | gui_id_t | id, |
| float | x, | ||
| float | y, | ||
| float | width, | ||
| float | height, | ||
| gui_handle_p | parent, | ||
| gui_widget_evt_fn | evt_fn, | ||
| uint16_t | flags | ||
| ) |
Create new image widget.
| [in] | id | Widget unique ID to use for identity for callback processing |
| [in] | x | Widget X position relative to parent widget |
| [in] | y | Widget Y position relative to parent widget |
| [in] | width | Widget width in units of pixels |
| [in] | height | Widget height in units of pixels |
| [in] | parent | Parent widget handle. Set to NULL to use current active parent widget |
| [in] | evt_fn | Custom widget callback function. Set to NULL to use default callback |
| [in] | flags | flags for widget creation |
NULL otherwise | uint8_t gui_image_setsource | ( | gui_handle_p | h, |
| const gui_image_desc_t * | img | ||
| ) |
Set image source to draw.
| [in] | h | Widget handle |
| [in] | img | Image object. Set to NULL to clear image |
1 on success, 0 otherwise