aboutsummaryrefslogtreecommitdiffstats
path: root/components/geometry/lib.rs
diff options
context:
space:
mode:
authorPaul Rouget <me@paulrouget.com>2018-03-13 14:36:00 +0800
committerPaul Rouget <me@paulrouget.com>2018-03-16 14:34:29 +0800
commite25dd451398905ed5e8eb3a29df5035fb1845492 (patch)
tree91df99656f9aeff076f83a918d578d67ff3d91fa /components/geometry/lib.rs
parentac4614d6ce2cf92a28314735811e10e970e85cd1 (diff)
downloadservo-e25dd451398905ed5e8eb3a29df5035fb1845492.tar.gz
servo-e25dd451398905ed5e8eb3a29df5035fb1845492.zip
alias some euclid types
Diffstat (limited to 'components/geometry/lib.rs')
-rw-r--r--components/geometry/lib.rs6
1 files changed, 5 insertions, 1 deletions
diff --git a/components/geometry/lib.rs b/components/geometry/lib.rs
index c22c9d16055..c4bb9721bf6 100644
--- a/components/geometry/lib.rs
+++ b/components/geometry/lib.rs
@@ -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