ThorVG  v0.13
LottieAnimationfinal

The LottieAnimation class enables control of advanced Lottie features. More...

Inheritance diagram for LottieAnimation:

Public Member Functions

Result override (const char *slot) noexcept
 Override Lottie properties using slot data. More...
 
- Public Member Functions inherited from Animation
Result frame (float no) noexcept
 Specifies the current frame in the animation. More...
 
Picturepicture () const noexcept
 Retrieves a picture instance associated with this animation instance. More...
 
float curFrame () const noexcept
 Retrieves the current frame number of the animation. More...
 
float totalFrame () const noexcept
 Retrieves the total number of frames in the animation. More...
 
float duration () const noexcept
 Retrieves the duration of the animation in seconds. More...
 

Static Public Member Functions

static std::unique_ptr< LottieAnimationgen () noexcept
 Creates a new LottieAnimation object. More...
 
- Static Public Member Functions inherited from Animation
static std::unique_ptr< Animationgen () noexcept
 Creates a new Animation object. More...
 

Detailed Description

The LottieAnimation class enables control of advanced Lottie features.

This class extends the Animation and has additional interfaces.

See also
Animation
Note
Experimental API

Member Function Documentation

◆ gen()

static std::unique_ptr<LottieAnimation> gen ( )
staticnoexcept

Creates a new LottieAnimation object.

Returns
A new LottieAnimation object.
Note
Experimental API

◆ override()

Result override ( const char *  slot)
noexcept

Override Lottie properties using slot data.

Parameters
[in]slotThe Lottie slot data in JSON format to override, or nullptr to reset.
Return values
Result::SuccessWhen succeed.
Result::InsufficientConditionIn case the animation is not loaded.
Result::InvalidArgumentsWhen the given parameter is invalid.
Note
Experimental API