feat: Remove bbox crate and use 1024 for image size
This commit is contained in:
@@ -53,8 +53,9 @@ impl Drawable<Array3<u8>> for Aabb2<usize> {
|
||||
let bottom = Aabb2::from_x1y1x2y2(x1y2.x, x1y2.y, x2y2.x, x2y2.y + thickness);
|
||||
let left = Aabb2::from_x1y1x2y2(x1y1.x, x1y1.y, x1y2.x + thickness, x1y2.y);
|
||||
let right = Aabb2::from_x1y1x2y2(x2y1.x, x2y1.y, x2y2.x + thickness, x2y2.y + thickness);
|
||||
let lines = [top, bottom, left, right];
|
||||
lines.into_iter().for_each(|line| {
|
||||
let canvas_bbox = Aabb2::from_x1y1x2y2(0, 0, canvas.dim().1 - 1, canvas.dim().0 - 1);
|
||||
let lines = [top, bottom, left, right].map(|bbox| bbox.clamp(&canvas_bbox));
|
||||
lines.into_iter().flatten().for_each(|line| {
|
||||
canvas
|
||||
.roi_mut(line)
|
||||
.map(|mut line| {
|
||||
|
||||
Reference in New Issue
Block a user