1
0
Fork 0
forked from wry/wry

rect: safer construction

This commit is contained in:
Stipe Kotarac 2025-12-29 10:42:17 +01:00 committed by Julian Orth
parent 411af0ea18
commit a1dfc473a2
33 changed files with 245 additions and 159 deletions

View file

@ -195,13 +195,12 @@ fn get_region(
.rects()
.iter()
.map(|r| {
Rect::new_sized(
Rect::new_sized_saturating(
r.x1() / scale,
r.y1() / scale,
r.width() / scale,
r.height() / scale,
)
.unwrap()
})
.collect();
region = Region::from_rects(&rects);