lv_anim_timeline.h

Defines

LV_ANIM_TIMELINE_PROGRESS_MAX

Typedefs

typedef struct lv_anim_timeline_t lv_anim_timeline_t

Functions

lv_anim_timeline_t *lv_anim_timeline_create(void)

Create an animation timeline.

返回:

pointer to the animation timeline.

void lv_anim_timeline_delete(lv_anim_timeline_t *at)

Delete animation timeline.

参数:

at -- pointer to the animation timeline.

void lv_anim_timeline_add(lv_anim_timeline_t *at, uint32_t start_time, const lv_anim_t *a)

Add animation to the animation timeline.

参数:
  • at -- pointer to the animation timeline.

  • start_time -- the time the animation started on the timeline, note that start_time will override the value of delay.

  • a -- pointer to an animation.

uint32_t lv_anim_timeline_start(lv_anim_timeline_t *at)

Start the animation timeline.

参数:

at -- pointer to the animation timeline.

返回:

total time spent in animation timeline.

void lv_anim_timeline_pause(lv_anim_timeline_t *at)

Pause the animation timeline.

参数:

at -- pointer to the animation timeline.

void lv_anim_timeline_set_reverse(lv_anim_timeline_t *at, bool reverse)

Set the playback direction of the animation timeline.

参数:
  • at -- pointer to the animation timeline.

  • reverse -- whether to play in reverse.

void lv_anim_timeline_set_progress(lv_anim_timeline_t *at, uint16_t progress)

Set the progress of the animation timeline.

参数:
  • at -- pointer to the animation timeline.

  • progress -- set value 0~65535 to map 0~100% animation progress.

uint32_t lv_anim_timeline_get_playtime(lv_anim_timeline_t *at)

Get the time used to play the animation timeline.

参数:

at -- pointer to the animation timeline.

返回:

total time spent in animation timeline.

bool lv_anim_timeline_get_reverse(lv_anim_timeline_t *at)

Get whether the animation timeline is played in reverse.

参数:

at -- pointer to the animation timeline.

返回:

return true if it is reverse playback.

uint16_t lv_anim_timeline_get_progress(lv_anim_timeline_t *at)

Get the progress of the animation timeline.

参数:

at -- pointer to the animation timeline.

返回:

return value 0~65535 to map 0~100% animation progress.