lv_lottie.h

API reference for lv_lottie.h

Report on GitHub
See Also: Private HeaderThis header has a companion private implementation with internal data structures.lv_lottie_private.h
Summary

Functions

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)
Parameters
NameTypeDescription
objlv_obj_t *pointer to a lottie widget
wint32_twidth of the animation and buffer
hint32_theight of the animation and buffer
bufvoid *a static buffer with width x height x 4 byte size

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)
Parameters
NameTypeDescription
objlv_obj_t *pointer to a lottie widget
draw_buflv_draw_buf_t *an initialized draw buffer with ARGB8888 color format

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)
Parameters
NameTypeDescription
objlv_obj_t *pointer to a lottie widget
srcconst void *the lottie animation converted to an nul terminated array
src_sizesize_tsize of the source array in bytes

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)
Parameters
NameTypeDescription
objlv_obj_t *pointer to a lottie widget
srcconst char *path to a json file, e.g. "path/to/file.json"

Dependencies

How is this guide?

Last updated on

On this page