lv_nanovg_image_cache.h

API reference for lv_nanovg_image_cache.h

Report on GitHub
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)
Parameters
NameTypeDescription
ustruct _lv_draw_nanovg_unit_t *pointer to the nanovg unit
srcconst void *the source image data
image_flagsintthe image flags
headerlv_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.

Dependencies

Last updated on

On this page