lv_draw_layer.h

Enums

enum lv_draw_layer_flags_t

Values:

enumerator LV_DRAW_LAYER_FLAG_NONE
enumerator LV_DRAW_LAYER_FLAG_HAS_ALPHA
enumerator LV_DRAW_LAYER_FLAG_CAN_SUBDIVIDE

Functions

struct _lv_draw_layer_ctx_t *lv_draw_layer_create(struct _lv_draw_ctx_t *draw_ctx, const lv_area_t *layer_area, lv_draw_layer_flags_t flags)

Create a new layer context. It is used to start and independent rendering session with the current draw_ctx

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

  • layer_area -- the coordinates of the layer

  • flags -- OR-ed flags from @lv_draw_layer_flags_t

Returns:

pointer to the layer context, or NULL on error

void lv_draw_layer_adjust(struct _lv_draw_ctx_t *draw_ctx, struct _lv_draw_layer_ctx_t *layer_ctx, lv_draw_layer_flags_t flags)

Adjust the layer_ctx and/or draw_ctx based on the layer_ctx->area_act. It's called only if flags has LV_DRAW_LAYER_FLAG_CAN_SUBDIVIDE

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

  • layer_ctx -- pointer to a layer context

  • flags -- OR-ed flags from @lv_draw_layer_flags_t

void lv_draw_layer_blend(struct _lv_draw_ctx_t *draw_ctx, struct _lv_draw_layer_ctx_t *layer_ctx, lv_draw_img_dsc_t *draw_dsc)

Blend a rendered layer to layer_ctx->area_act

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

  • layer_ctx -- pointer to a layer context

  • draw_dsc -- pointer to an image draw descriptor

void lv_draw_layer_destroy(struct _lv_draw_ctx_t *draw_ctx, struct _lv_draw_layer_ctx_t *layer_ctx)

Destroy a layer context.

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

  • layer_ctx -- pointer to a layer context