Skip to content

Commit

Permalink
masonry: Use kurbo::Rect::scale_from_origin() (linebender#542)
Browse files Browse the repository at this point in the history
  • Loading branch information
waywardmonkeys authored Aug 25, 2024
1 parent 0914079 commit 1d87fce
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions masonry/src/passes/accessibility.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

// ----------------
Expand Down

0 comments on commit 1d87fce

Please sign in to comment.