Skip to content

Commit

Permalink
fix: refactors
Browse files Browse the repository at this point in the history
  • Loading branch information
samuelOsborne committed Sep 16, 2024
1 parent 9214730 commit 5373027
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -592,7 +592,7 @@ $$($1_THORVG_DEP_BUILD_DIR)/$(NINJA_BUILD_FILE): export PKG_CONFIG_PATH := $(PWD
$$($1_THORVG_DEP_BUILD_DIR)/$(NINJA_BUILD_FILE): THORVG_DEP_SOURCE_DIR := $(DEPS_MODULES_DIR)/$(THORVG)
$$($1_THORVG_DEP_BUILD_DIR)/$(NINJA_BUILD_FILE): THORVG_DEP_BUILD_DIR := $$($1_THORVG_DEP_BUILD_DIR)
$$($1_THORVG_DEP_BUILD_DIR)/$(NINJA_BUILD_FILE): CROSS_FILE := --cross-file $$($1_THORVG_DEP_BUILD_DIR)/../$(MESON_CROSS_FILE)
$$($1_THORVG_DEP_BUILD_DIR)/$(NINJA_BUILD_FILE): LOG := $2
$$($1_THORVG_DEP_BUILD_DIR)/$(NINJA_BUILD_FILE): LOG := false
$$($1_THORVG_DEP_BUILD_DIR)/$(NINJA_BUILD_FILE): STATIC := $3
$$($1_THORVG_DEP_BUILD_DIR)/$(NINJA_BUILD_FILE): EXTRA := $4
$$($1_THORVG_DEP_BUILD_DIR)/$(NINJA_BUILD_FILE): $$($1_THORVG_DEP_BUILD_DIR)/../$(MESON_CROSS_FILE)
Expand Down
11 changes: 4 additions & 7 deletions dotlottie-rs/src/dotlottie_player.rs
Original file line number Diff line number Diff line change
Expand Up @@ -208,18 +208,15 @@ impl DotLottieRuntime {
pub fn get_layer_bounds(&self, layer_name: &str) -> Vec<f32> {
let bbox = self.renderer.get_layer_bounds(layer_name);

if bbox.is_ok() {
let bbox = bbox.unwrap();

LayerBoundingBox {
match bbox {
Err(_) => LayerBoundingBox::default().into(),
Ok(bbox) => LayerBoundingBox {
x: bbox.0,
y: bbox.1,
w: bbox.2,
h: bbox.3,
}
.into()
} else {
LayerBoundingBox::default().into()
.into(),
}
}

Expand Down

0 comments on commit 5373027

Please sign in to comment.