mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Update app_units to 0.4.1
This commit is contained in:
parent
f05491166f
commit
2230332f46
16 changed files with 39 additions and 40 deletions
|
@ -14,6 +14,6 @@ path = "lib.rs"
|
|||
servo = ["euclid/unstable"]
|
||||
|
||||
[dependencies]
|
||||
app_units = "0.4"
|
||||
app_units = "0.4.1"
|
||||
euclid = "0.11"
|
||||
heapsize = "0.3.0"
|
||||
|
|
|
@ -6,7 +6,7 @@ extern crate app_units;
|
|||
extern crate euclid;
|
||||
#[macro_use] extern crate heapsize;
|
||||
|
||||
use app_units::{Au, MAX_AU};
|
||||
use app_units::{Au, MAX_AU, MIN_AU};
|
||||
use euclid::point::Point2D;
|
||||
use euclid::rect::Rect;
|
||||
use euclid::size::Size2D;
|
||||
|
@ -38,7 +38,7 @@ known_heap_size!(0, DeviceIndependentPixel);
|
|||
|
||||
#[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))
|
||||
Rect::new(Point2D::new(MIN_AU / 2, MIN_AU / 2), Size2D::new(MAX_AU, MAX_AU))
|
||||
}
|
||||
|
||||
/// A helper function to convert a rect of `f32` pixels to a rect of app units.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue