Update app_units to 0.4.1

This commit is contained in:
Manish Goregaokar 2017-05-17 13:07:12 -07:00
parent f05491166f
commit 2230332f46
16 changed files with 39 additions and 40 deletions

View file

@ -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.