lv_draw_img.h

Functions

void lv_draw_img_dsc_init(lv_draw_img_dsc_t *dsc)
void lv_draw_img(struct _lv_draw_ctx_t *draw_ctx, const lv_draw_img_dsc_t *dsc, const lv_area_t *coords, const void *src)

Draw an image

Parameters:
  • draw_ctx -- pointer to the current draw context

  • dsc -- pointer to an initialized lv_draw_img_dsc_t variable

  • coords -- the coordinates of the image

  • src -- pointer to a lv_color_t array which contains the pixels of the image

void lv_draw_img_decoded(struct _lv_draw_ctx_t *draw_ctx, const lv_draw_img_dsc_t *dsc, const lv_area_t *coords, const uint8_t *map_p, const lv_draw_img_sup_t *sup, lv_color_format_t color_format)

Draw a decoded image

Parameters:
  • draw_ctx -- pointer to the current draw context

  • dsc -- pointer to an initialized lv_draw_img_dsc_t variable

  • coords -- the coordinates of the image

  • map_p --

  • sup --

  • color_format --

lv_img_src_t lv_img_src_get_type(const void *src)

Get the type of an image source

Parameters:

src -- pointer to an image source:

  • pointer to an 'lv_img_t' variable (image stored internally and compiled into the code)

  • a path to a file (e.g. "S:/folder/image.bin")

  • or a symbol (e.g. LV_SYMBOL_CLOSE)

Returns:

type of the image source LV_IMG_SRC_VARIABLE/FILE/SYMBOL/UNKNOWN

struct lv_draw_img_sup_t

Public Members

lv_color_t chroma_key_color
lv_color_t alpha_color
const lv_color32_t *palette
uint32_t palette_size
uint32_t chroma_keyed
struct lv_draw_img_dsc_t

Public Members

lv_coord_t angle
lv_coord_t zoom
lv_point_t pivot
lv_color_t chroma_key_color
lv_color_t recolor
lv_opa_t recolor_opa
lv_opa_t opa
lv_blend_mode_t blend_mode
int32_t frame_id
uint16_t antialias
lv_draw_img_sup_t *sup