Skip to content

Commit

Permalink
Call outline.bounds directly instead of making a custom union routine
Browse files Browse the repository at this point in the history
  • Loading branch information
Jasper-Bekkers committed Nov 18, 2022
1 parent 4e7ea80 commit 5094184
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 13 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ render = ["scale", "zeno/eval"]

[dependencies]
yazi = { version = "0.1.4", optional = true }
zeno = { version = "0.2.2", optional = true, default_features = false }
-zeno = { version = "0.2.2", optional = true, default_features = false }
13 changes: 1 addition & 12 deletions src/scale/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -890,18 +890,7 @@ impl<'a> Render<'a> {
}
let palette = proxy.color.palette(font, *palette_index);

let mut total_bounds = zeno::Bounds::empty();

for i in 0..outline.len() {
let layer = match outline.get(i) {
Some(layer) => layer,
_ => {
break;
}
};
let bounds = layer.bounds();
total_bounds = total_bounds.grow(&bounds);
}
let mut total_bounds = outline.bounds();

let base_x = total_bounds.min.x.floor() as i32;
let base_y = total_bounds.min.y.floor() as i32;
Expand Down

0 comments on commit 5094184

Please sign in to comment.