Skip to content

Commit

Permalink
chore: 🤖 update thorvg apis
Browse files Browse the repository at this point in the history
  • Loading branch information
theashraf committed Jan 11, 2024
1 parent bb165f9 commit 52e6993
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
4 changes: 2 additions & 2 deletions dotlottie-rs/src/dotlottie_player.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ impl DotLottiePlayer {
}

pub fn frame(&self, no: f32) {
self.canvas.clear(false, true);
self.canvas.clear(true);

self.animation.set_frame(no);

Expand Down Expand Up @@ -83,7 +83,7 @@ impl DotLottiePlayer {
}

pub fn clear(&self) {
self.canvas.clear(false, true);
self.canvas.clear(true);
}

pub fn load_animation_from_path(&self, path: &str, width: u32, height: u32) -> bool {
Expand Down
5 changes: 2 additions & 3 deletions dotlottie-rs/src/thorvg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@ impl Canvas {
convert_tvg_result(result)
}

pub fn clear(&self, paints: bool, buffer: bool) -> Result<(), TvgError> {
let result = unsafe { tvg_canvas_clear(self.raw_canvas, paints, buffer) };
pub fn clear(&self, free: bool) -> Result<(), TvgError> {
let result = unsafe { tvg_canvas_clear(self.raw_canvas, free) };

convert_tvg_result(result)
}
Expand Down Expand Up @@ -151,7 +151,6 @@ impl Picture {
data.as_ptr() as *const std::os::raw::c_char,
data.len() as u32,
mimetype.as_ptr(),
std::ptr::null(),
false,
)
};
Expand Down

0 comments on commit 52e6993

Please sign in to comment.