lv_nanovg_image_cache.h

Functions

void lv_nanovg_image_cache_init(struct _lv_draw_nanovg_unit_t *u)

Initialize the image cache.

Parameters:

u – pointer to the nanovg unit

void lv_nanovg_image_cache_deinit(struct _lv_draw_nanovg_unit_t *u)

Deinitialize the image cache.

Parameters:

u – pointer to the nanovg unit

int lv_nanovg_image_cache_get_handle(struct _lv_draw_nanovg_unit_t *u, const void *src, lv_color32_t color, int image_flags, lv_image_header_t *header)

Get the image handle from the cache, create a new one if not found.

Parameters:
  • u – pointer to the nanovg unit

  • src – the source image data

  • color – the color to apply

  • image_flags – the image flags

  • header – the image header to fill (can be NULL)

Returns:

the image handle, or -1 on failure

void lv_nanovg_image_cache_drop(struct _lv_draw_nanovg_unit_t *u, const void *src)

Drop the image from the cache.

Parameters:
  • u – pointer to the nanovg unit

  • src – the source image data