masonry: Use `kurbo::Rect::scale_from_origin()` (#542)

This commit is contained in:
Bruce Mitchener 2024-08-25 16:41:21 +07:00 committed by GitHub
parent 0914079d0c
commit 1d87fce293
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 2 deletions

View File

@ -136,8 +136,8 @@ fn build_access_node(
}
fn to_accesskit_rect(r: Rect, scale_factor: f64) -> accesskit::Rect {
let s = scale_factor;
accesskit::Rect::new(s * r.x0, s * r.y0, s * r.x1, s * r.y1)
let sr = r.scale_from_origin(scale_factor);
accesskit::Rect::new(sr.x0, sr.y0, sr.x1, sr.y1)
}
// ----------------