lv_lottie.h
API reference for lv_lottie.h
See Also: Private HeaderThis header has a companion private implementation with internal data structures.lv_lottie_private.h
Summary
Functions
public/widgets/lv_lottie.h:48function
lv_lottie_set_buffer
Set a buffer for the animation. It also defines the size of the animation
void lv_lottie_set_buffer(lv_obj_t *obj, int32_t w, int32_t h, void *buf)| Name | Type | Description |
|---|---|---|
obj | lv_obj_t * | pointer to a lottie widget |
w | int32_t | width of the animation and buffer |
h | int32_t | height of the animation and buffer |
buf | void * | a static buffer with width x height x 4 byte size |
public/widgets/lv_lottie.h:55function
lv_lottie_set_draw_buf
Set a draw buffer for the animation. It also defines the size of the animation
void lv_lottie_set_draw_buf(lv_obj_t *obj, lv_draw_buf_t *draw_buf)| Name | Type | Description |
|---|---|---|
obj | lv_obj_t * | pointer to a lottie widget |
draw_buf | lv_draw_buf_t * | an initialized draw buffer with ARGB8888 color format |
public/widgets/lv_lottie.h:63function
lv_lottie_set_src_data
Set the source for the animation as an array
void lv_lottie_set_src_data(lv_obj_t *obj, const void *src, size_t src_size)| Name | Type | Description |
|---|---|---|
obj | lv_obj_t * | pointer to a lottie widget |
src | const void * | the lottie animation converted to an nul terminated array |
src_size | size_t | size of the source array in bytes |
public/widgets/lv_lottie.h:71function
lv_lottie_set_src_file
Set the source for the animation as a path. Lottie doesn't use LVGL's File System API.
void lv_lottie_set_src_file(lv_obj_t *obj, const char *src)| Name | Type | Description |
|---|---|---|
obj | lv_obj_t * | pointer to a lottie widget |
src | const char * | path to a json file, e.g. "path/to/file.json" |
public/widgets/lv_lottie.h:78function
lv_lottie_get_anim
Get the LVGL animation which controls the lottie animation
lv_anim_t * lv_lottie_get_anim(lv_obj_t *obj)| Name | Type | Description |
|---|---|---|
obj | lv_obj_t * | pointer to a lottie widget |
Returns: lv_anim_t * — the LVGL animation
public/widgets/lv_lottie.h:39function
lv_lottie_create
Create a lottie animation
lv_obj_t * lv_lottie_create(lv_obj_t *parent)| Name | Type | Description |
|---|---|---|
parent | lv_obj_t * | pointer to a parent widget May be NULL.. When NULL, the widget is created as a screen on the default display. |
Returns: lv_obj_t * — pointer to the created Lottie animation widget
Dependencies
Last updated on