Animation Image (lv_animimg)
The animation image is similar to the normal 'Image' Widget. The only difference is that instead of one source image, you set an array of multiple source images that supply "frames" in an animation.
Overview
The animation image is similar to the normal 'Image' Widget. The only difference is that instead of one source image, you set an array of multiple source images that supply "frames" in an animation.
You can specify a duration and repeat count.
Parts and Styles
LV_PART_MAINA background rectangle that uses the typical background style properties and the image itself using the image style properties.
Usage
Image sources
To set the image animation image sources, use
lv_animimg_set_src(animimg, dsc[], num).
To set the images source for flip playback of animation image, use
lv_animimg_set_src_reverse(animimg, dsc[], num).
Using the inner animation
For more advanced use cases, the animation used internally by the image can be
retrieved using lv_animimg_get_anim(animimg). Using this, you can
use the Animation functions, for example, to
override the animation values using the
lv_anim_set_values(anim, start, end) or to set a callback
on the animation completed event.
Events
No special events are sent by Animation-Image Widgets.
Keys
No Keys are processed by Animation-Image Widgets.
Further Reading
Learn more about Keys.
Example
Simple Animation Image
API
How is this guide?
Last updated on