aboutsummaryrefslogtreecommitdiffstats
path: root/components/layout_2020/primitives.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/layout_2020/primitives.rs')
-rw-r--r--components/layout_2020/primitives.rs28
1 files changed, 0 insertions, 28 deletions
diff --git a/components/layout_2020/primitives.rs b/components/layout_2020/primitives.rs
deleted file mode 100644
index 0991478ac06..00000000000
--- a/components/layout_2020/primitives.rs
+++ /dev/null
@@ -1,28 +0,0 @@
-use crate::text;
-
-/// Origin at top-left corner, unit `1px`
-pub struct CssPx;
-
-pub use euclid::point2 as point;
-pub use euclid::rect;
-pub type Length<U> = euclid::Length<f32, U>;
-pub type Point<U> = euclid::TypedPoint2D<f32, U>;
-pub type Size<U> = euclid::TypedSize2D<f32, U>;
-pub type Rect<U> = euclid::TypedRect<f32, U>;
-pub type SideOffsets<U> = euclid::TypedSideOffsets2D<f32, U>;
-pub type Scale<Src, Dest> = euclid::TypedScale<f32, Src, Dest>;
-
-#[derive(Copy, Clone, PartialEq)]
-pub struct RGBA(pub f32, pub f32, pub f32, pub f32);
-
-pub struct TextRun<'a> {
- pub segment: &'a text::ShapedSegment,
- pub font_size: Length<CssPx>,
- pub origin: Point<CssPx>,
-}
-
-impl From<cssparser::RGBA> for RGBA {
- fn from(c: cssparser::RGBA) -> Self {
- RGBA(c.red_f32(), c.green_f32(), c.blue_f32(), c.alpha_f32())
- }
-}