pub type Builder = RefHandle<skottie_Animation_Builder>;Expand description
A builder for creating Animation instances with custom configuration.
The builder allows setting a resource provider for loading external assets, a font manager for text rendering, and various flags to control animation loading.
§Example
use skia_safe::skottie::Builder;
let json = r#"{"v":"5.5.7","fr":30,"ip":0,"op":60,"w":200,"h":200,"layers":[]}"#;
let animation = Builder::new().make(json);Aliased Type§
pub struct Builder(/* private fields */);Implementations§
Source§impl Builder
impl Builder
Sourcepub fn with_flags(flags: BuilderFlags) -> Self
pub fn with_flags(flags: BuilderFlags) -> Self
Create a new animation builder with the specified flags.
Sourcepub fn set_font_manager(self, font_mgr: FontMgr) -> Self
pub fn set_font_manager(self, font_mgr: FontMgr) -> Self
Set the font manager to use for text rendering.
Consumes and returns self for method chaining.
Sourcepub fn set_resource_provider(
self,
provider: impl Into<NativeResourceProvider>,
) -> Self
pub fn set_resource_provider( self, provider: impl Into<NativeResourceProvider>, ) -> Self
Set the resource provider for loading external assets.
The resource provider is used to load images, fonts, and other external resources referenced by the animation.
Consumes and returns self for method chaining.