Skia
2D Graphics Library
skottie::Animation::Builder Class Referencefinal

#include <Skottie.h>

Classes

struct  Stats
 

Public Types

enum  Flags : uint32_t { kDeferImageLoading = 0x01 , kPreferEmbeddedFonts = 0x02 }
 

Public Member Functions

 Builder (uint32_t flags=0)
 
 ~Builder ()
 
const StatsgetStats () const
 Returns various animation build stats. More...
 
BuildersetResourceProvider (sk_sp< ResourceProvider >)
 Specify a loader for external resources (images, etc.). More...
 
BuildersetFontManager (sk_sp< SkFontMgr >)
 Specify a font manager for loading animation fonts. More...
 
BuildersetPropertyObserver (sk_sp< PropertyObserver >)
 Specify a PropertyObserver to receive callbacks during parsing. More...
 
BuildersetLogger (sk_sp< Logger >)
 Register a Logger with this builder. More...
 
BuildersetMarkerObserver (sk_sp< MarkerObserver >)
 Register a MarkerObserver with this builder. More...
 
BuildersetPrecompInterceptor (sk_sp< PrecompInterceptor >)
 Register a precomp layer interceptor. More...
 
BuildersetExpressionManager (sk_sp< ExpressionManager >)
 Registers an ExpressionManager to evaluate AE expressions. More...
 
sk_sp< Animationmake (SkStream *)
 Animation factories. More...
 
sk_sp< Animationmake (const char *data, size_t length)
 
sk_sp< AnimationmakeFromFile (const char path[])
 
const sk_sp< SlotManager > & getSlotManager () const
 Get handle for SlotManager after animation is built. More...
 

Member Enumeration Documentation

◆ Flags

Enumerator
kDeferImageLoading 
kPreferEmbeddedFonts 

Constructor & Destructor Documentation

◆ Builder()

skottie::Animation::Builder::Builder ( uint32_t  flags = 0)
explicit

◆ ~Builder()

skottie::Animation::Builder::~Builder ( )

Member Function Documentation

◆ getSlotManager()

const sk_sp<SlotManager>& skottie::Animation::Builder::getSlotManager ( ) const
inline

Get handle for SlotManager after animation is built.

◆ getStats()

const Stats& skottie::Animation::Builder::getStats ( ) const
inline

Returns various animation build stats.

Returns
Stats (see above).

◆ make() [1/2]

sk_sp<Animation> skottie::Animation::Builder::make ( const char *  data,
size_t  length 
)

◆ make() [2/2]

sk_sp<Animation> skottie::Animation::Builder::make ( SkStream )

Animation factories.

◆ makeFromFile()

sk_sp<Animation> skottie::Animation::Builder::makeFromFile ( const char  path[])

◆ setExpressionManager()

Builder& skottie::Animation::Builder::setExpressionManager ( sk_sp< ExpressionManager )

Registers an ExpressionManager to evaluate AE expressions.

If unspecified, expressions in the animation JSON will be ignored.

◆ setFontManager()

Builder& skottie::Animation::Builder::setFontManager ( sk_sp< SkFontMgr )

Specify a font manager for loading animation fonts.

◆ setLogger()

Builder& skottie::Animation::Builder::setLogger ( sk_sp< Logger )

Register a Logger with this builder.

◆ setMarkerObserver()

Builder& skottie::Animation::Builder::setMarkerObserver ( sk_sp< MarkerObserver )

Register a MarkerObserver with this builder.

◆ setPrecompInterceptor()

Builder& skottie::Animation::Builder::setPrecompInterceptor ( sk_sp< PrecompInterceptor )

Register a precomp layer interceptor.

This allows substituting precomp layers with custom/externally managed content.

◆ setPropertyObserver()

Builder& skottie::Animation::Builder::setPropertyObserver ( sk_sp< PropertyObserver )

Specify a PropertyObserver to receive callbacks during parsing.

See SkottieProperty.h for more details.

◆ setResourceProvider()

Builder& skottie::Animation::Builder::setResourceProvider ( sk_sp< ResourceProvider )

Specify a loader for external resources (images, etc.).


The documentation for this class was generated from the following file: