feat: Remove bbox crate and use 1024 for image size

This commit is contained in:
uttarayan21
2025-08-05 18:14:31 +05:30
parent 06fb0b4487
commit 043a845fc1
10 changed files with 89 additions and 839 deletions

View File

@@ -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| {