mirror of https://github.com/linebender/xilem
masonry: Use `kurbo::Rect::scale_from_origin()` (#542)
This commit is contained in:
parent
0914079d0c
commit
1d87fce293
|
@ -136,8 +136,8 @@ fn build_access_node(
|
||||||
}
|
}
|
||||||
|
|
||||||
fn to_accesskit_rect(r: Rect, scale_factor: f64) -> accesskit::Rect {
|
fn to_accesskit_rect(r: Rect, scale_factor: f64) -> accesskit::Rect {
|
||||||
let s = scale_factor;
|
let sr = r.scale_from_origin(scale_factor);
|
||||||
accesskit::Rect::new(s * r.x0, s * r.y0, s * r.x1, s * r.y1)
|
accesskit::Rect::new(sr.x0, sr.y0, sr.x1, sr.y1)
|
||||||
}
|
}
|
||||||
|
|
||||||
// ----------------
|
// ----------------
|
||||||
|
|
Loading…
Reference in New Issue