lv_obj_draw.h

Enums

enum lv_layer_type_t

Values:

enumerator LV_LAYER_TYPE_NONE
enumerator LV_LAYER_TYPE_SIMPLE
enumerator LV_LAYER_TYPE_TRANSFORM

Functions

void lv_obj_init_draw_rect_dsc(lv_obj_t *obj, uint32_t part, lv_draw_rect_dsc_t *draw_dsc)

Initialize a rectangle draw descriptor from an object's styles in its current state

备注

Only the relevant fields will be set. E.g. if border width == 0 the other border properties won't be evaluated.

参数:
  • obj -- pointer to an object

  • part -- part of the object, e.g. LV_PART_MAIN, LV_PART_SCROLLBAR, LV_PART_KNOB, etc

  • draw_dsc -- the descriptor to initialize. If an ..._opa field is set to LV_OPA_TRANSP the related properties won't be initialized. Should be initialized with lv_draw_rect_dsc_init(draw_dsc).

void lv_obj_init_draw_label_dsc(lv_obj_t *obj, uint32_t part, lv_draw_label_dsc_t *draw_dsc)

Initialize a label draw descriptor from an object's styles in its current state

参数:
  • obj -- pointer to an object

  • part -- part of the object, e.g. LV_PART_MAIN, LV_PART_SCROLLBAR, LV_PART_KNOB, etc

  • draw_dsc -- the descriptor to initialize. If the opa field is set to or the property is equal to LV_OPA_TRANSP the rest won't be initialized. Should be initialized with lv_draw_label_dsc_init(draw_dsc).

void lv_obj_init_draw_image_dsc(lv_obj_t *obj, uint32_t part, lv_draw_image_dsc_t *draw_dsc)

Initialize an image draw descriptor from an object's styles in its current state

参数:
  • obj -- pointer to an object

  • part -- part of the object, e.g. LV_PART_MAIN, LV_PART_SCROLLBAR, LV_PART_KNOB, etc

  • draw_dsc -- the descriptor to initialize. Should be initialized with lv_draw_image_dsc_init(draw_dsc).

void lv_obj_init_draw_line_dsc(lv_obj_t *obj, uint32_t part, lv_draw_line_dsc_t *draw_dsc)

Initialize a line draw descriptor from an object's styles in its current state

参数:
  • obj -- pointer to an object

  • part -- part of the object, e.g. LV_PART_MAIN, LV_PART_SCROLLBAR, LV_PART_KNOB, etc

  • draw_dsc -- the descriptor to initialize. Should be initialized with lv_draw_line_dsc_init(draw_dsc).

void lv_obj_init_draw_arc_dsc(lv_obj_t *obj, uint32_t part, lv_draw_arc_dsc_t *draw_dsc)

Initialize an arc draw descriptor from an object's styles in its current state

参数:
  • obj -- pointer to an object

  • part -- part of the object, e.g. LV_PART_MAIN, LV_PART_SCROLLBAR, LV_PART_KNOB, etc

  • draw_dsc -- the descriptor to initialize. Should be initialized with lv_draw_arc_dsc_init(draw_dsc).

int32_t lv_obj_calculate_ext_draw_size(lv_obj_t *obj, uint32_t part)

Get the required extra size (around the object's part) to draw shadow, outline, value etc.

参数:
  • obj -- pointer to an object

  • part -- part of the object

返回:

the extra size required around the object

void lv_obj_refresh_ext_draw_size(lv_obj_t *obj)

Send a 'LV_EVENT_REFR_EXT_DRAW_SIZE' Call the ancestor's event handler to the object to refresh the value of the extended draw size. The result will be saved in obj.

参数:

obj -- pointer to an object

int32_t _lv_obj_get_ext_draw_size(const lv_obj_t *obj)

Get the extended draw area of an object.

参数:

obj -- pointer to an object

返回:

the size extended draw area around the real coordinates

lv_layer_type_t _lv_obj_get_layer_type(const lv_obj_t *obj)