mirror of
https://github.com/servo/servo.git
synced 2025-08-02 04:00:32 +01:00
Update to euclid 0.8
This commit is contained in:
parent
b7facf41cb
commit
6259df5e2d
56 changed files with 538 additions and 558 deletions
|
@ -32,16 +32,10 @@ known_heap_size!(0, ScreenPx);
|
|||
// originally proposed in 2002 as a standard unit of measure in Gecko.
|
||||
// See https://bugzilla.mozilla.org/show_bug.cgi?id=177805 for more info.
|
||||
|
||||
pub static MAX_RECT: Rect<Au> = Rect {
|
||||
origin: Point2D {
|
||||
x: Au(i32::MIN / 2),
|
||||
y: Au(i32::MIN / 2),
|
||||
},
|
||||
size: Size2D {
|
||||
width: MAX_AU,
|
||||
height: MAX_AU,
|
||||
}
|
||||
};
|
||||
#[inline(always)]
|
||||
pub fn max_rect() -> Rect<Au> {
|
||||
Rect::new(Point2D::new(Au(i32::MIN / 2), Au(i32::MIN / 2)), Size2D::new(MAX_AU, MAX_AU))
|
||||
}
|
||||
|
||||
/// 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> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue