lv_nanovg_image_cache.h
API reference for lv_nanovg_image_cache.h
Summary
Functions
lv_nanovg_image_cache_get_handle
Get the image handle from the cache, create a new one if not found.
int lv_nanovg_image_cache_get_handle(struct _lv_draw_nanovg_unit_t *u, const void *src, int image_flags, lv_image_header_t *header)| Name | Type | Description |
|---|---|---|
u | struct _lv_draw_nanovg_unit_t * | pointer to the nanovg unit |
src | const void * | the source image data |
image_flags | int | the image flags |
header | lv_image_header_t * | the image header to fill (can be NULL) |
Returns: int — the image handle, or -1 on failure
Modifiable sources (canvas/snapshot/lottie) are detected via the decoded buffer flags and are not cached, so callers don't need to decide.
lv_nanovg_image_cache_init
Initialize the image cache.
void lv_nanovg_image_cache_init(struct _lv_draw_nanovg_unit_t *u)| Name | Type | Description |
|---|---|---|
u | struct _lv_draw_nanovg_unit_t * | pointer to the nanovg unit |
lv_nanovg_image_cache_deinit
Deinitialize the image cache.
void lv_nanovg_image_cache_deinit(struct _lv_draw_nanovg_unit_t *u)| Name | Type | Description |
|---|---|---|
u | struct _lv_draw_nanovg_unit_t * | pointer to the nanovg unit |
lv_nanovg_image_cache_drop
Drop the image from the cache.
void lv_nanovg_image_cache_drop(struct _lv_draw_nanovg_unit_t *u, const void *src)| Name | Type | Description |
|---|---|---|
u | struct _lv_draw_nanovg_unit_t * | pointer to the nanovg unit |
src | const void * | the source image data |
Dependencies
lvgl_public.hlv_draw_image_private.h
Last updated on