alias some euclid types

This commit is contained in:
Paul Rouget 2018-03-13 14:36:00 +08:00
parent ac4614d6ce
commit e25dd45139
11 changed files with 73 additions and 69 deletions

View file

@ -5,16 +5,20 @@
extern crate app_units;
extern crate euclid;
extern crate malloc_size_of;
extern crate style_traits;
#[macro_use] extern crate malloc_size_of_derive;
extern crate webrender_api;
use app_units::{Au, MAX_AU, MIN_AU};
use euclid::{Point2D, Rect, Size2D};
use euclid::{Length, Point2D, Rect, Size2D};
use std::f32;
use style_traits::DevicePixel;
use webrender_api::{LayoutPoint, LayoutRect, LayoutSize};
// Units for use with euclid::length and euclid::scale_factor.
pub type DeviceUintLength = Length<u32, DevicePixel>;
/// A normalized "pixel" at the default resolution for the display.
///
/// Like the CSS "px" unit, the exact physical size of this unit may vary between devices, but it