rect: safer construction
This commit is contained in:
parent
411af0ea18
commit
a1dfc473a2
33 changed files with 245 additions and 159 deletions
|
|
@ -123,13 +123,12 @@ impl Cursor for CursorSurface {
|
|||
return rect;
|
||||
}
|
||||
let scale = scale.to_f64();
|
||||
Rect::new(
|
||||
Rect::new_saturating(
|
||||
(rect.x1() as f64 * scale).ceil() as _,
|
||||
(rect.y1() as f64 * scale).ceil() as _,
|
||||
(rect.x2() as f64 * scale).ceil() as _,
|
||||
(rect.y2() as f64 * scale).ceil() as _,
|
||||
)
|
||||
.unwrap()
|
||||
}
|
||||
|
||||
fn set_output(&self, output: &Rc<OutputNode>) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue