mirror of
https://github.com/servo/servo.git
synced 2025-08-04 21:20:23 +01:00
parent
a9aa50683f
commit
5c408d2be9
39 changed files with 397 additions and 377 deletions
|
@ -277,7 +277,7 @@ pub fn rect_contains_point<T:PartialOrd + Add<T, Output=T>>(rect: Rect<T>, point
|
|||
|
||||
/// A helper function to convert a rect of `f32` pixels to a rect of app units.
|
||||
pub fn f32_rect_to_au_rect(rect: Rect<f32>) -> Rect<Au> {
|
||||
Rect(Point2D(Au::from_f32_px(rect.origin.x), Au::from_f32_px(rect.origin.y)),
|
||||
Size2D(Au::from_f32_px(rect.size.width), Au::from_f32_px(rect.size.height)))
|
||||
Rect::new(Point2D::new(Au::from_f32_px(rect.origin.x), Au::from_f32_px(rect.origin.y)),
|
||||
Size2D::new(Au::from_f32_px(rect.size.width), Au::from_f32_px(rect.size.height)))
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue