LottieFiles / dotlottie-rs

A universal, high-performance Lottie and dotLottie player built with Rust. Offers smooth rendering across platforms, low resource consumption, and extensive compatibility. Features FFI bindings for Kotlin, Swift, and WASM for seamless integration in Android, iOS, and Web projects.
https://developers.lottiefiles.com/docs/dotlottie-player/
MIT License
146 stars 8 forks source link

feat: 🎸 expose lottie animation original size #180

Closed theashraf closed 2 months ago

theashraf commented 3 months ago

This pull request introduces a new feature to expose the original size of an animation using the tvg_picture_get_size function from the ThorVG C API. The retrieved animation size information is then stored in the LottieRenderer for future queries.

Changes

Usage

let dotlottie_player = DotLottiePlayer::new(Config::default());

// Method to return a vec [width, height] as retrieved from `tvg_picture_get_size`
dotlottie_player.animation_size();

fix #175

changeset-bot[bot] commented 3 months ago

⚠️ No Changeset found

Latest commit: afcaeee2b4ea628fa0e6bae0309fc64af87dce79

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR