rect: safer construction
This commit is contained in:
parent
411af0ea18
commit
a1dfc473a2
33 changed files with 245 additions and 159 deletions
|
|
@ -49,7 +49,7 @@ impl RendererBase<'_> {
|
|||
let [x1, y1, x2, y2] =
|
||||
self.scale
|
||||
.pixel_size([rect.x1(), rect.y1(), rect.x2(), rect.y2()]);
|
||||
rect = Rect::new(x1, y1, x2, y2).unwrap();
|
||||
rect = Rect::new_saturating(x1, y1, x2, y2);
|
||||
}
|
||||
rect
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue