Edit

Animation.TryCreate Method

Definition

Overloads

Name Description
TryCreate(SKData, Animation)

Attempts to create an animation from Lottie JSON data.

TryCreate(SKStream, Animation)

Attempts to create an animation from a Skia stream containing Lottie JSON data.

TryCreate(Stream, Animation)

Attempts to create an animation from a .NET stream containing Lottie JSON data.

TryCreate(String, Animation)

Attempts to create an animation from a Lottie JSON file.

TryCreate(SKData, Animation)

Attempts to create an animation from Lottie JSON data.

public static bool TryCreate(SkiaSharp.SKData data, out SkiaSharp.Skottie.Animation? animation);

Parameters

data
SKData

The Lottie animation data in JSON format.

animation
Animation

When this method returns, contains the animation, or null if the creation failed.

Returns

true if the animation was created successfully; otherwise, false.

Remarks

Use the Builder helper for more options and control over the loading process.

Applies to

TryCreate(SKStream, Animation)

Attempts to create an animation from a Skia stream containing Lottie JSON data.

public static bool TryCreate(SkiaSharp.SKStream stream, out SkiaSharp.Skottie.Animation? animation);

Parameters

stream
SKStream

A Skia stream containing Lottie animation JSON data.

animation
Animation

When this method returns, contains the animation, or null if the creation failed.

Returns

true if the animation was created successfully; otherwise, false.

Remarks

Use the Builder helper for more options and control over the loading process.

Applies to

TryCreate(Stream, Animation)

Attempts to create an animation from a .NET stream containing Lottie JSON data.

public static bool TryCreate(System.IO.Stream stream, out SkiaSharp.Skottie.Animation? animation);

Parameters

stream
Stream

A .NET stream containing Lottie animation JSON data.

animation
Animation

When this method returns, contains the animation, or null if the creation failed.

Returns

true if the animation was created successfully; otherwise, false.

Remarks

Use the Builder helper for more options and control over the loading process.

Applies to

TryCreate(String, Animation)

Attempts to create an animation from a Lottie JSON file.

public static bool TryCreate(string path, out SkiaSharp.Skottie.Animation? animation);

Parameters

path
String

The path to a Lottie animation JSON file.

animation
Animation

When this method returns, contains the animation, or null if the creation failed.

Returns

true if the animation was created successfully; otherwise, false.

Remarks

Use the Builder helper for more options and control over the loading process.

Applies to