1
/// A type representing a width and height.
2
pub type Size<T = f32, Unit = Unknown> = figures::Size<T, Unit>;
3
/// A type representing an x and y coordinate.
4
pub type Point<T = f32, Unit = Unknown> = figures::Point<T, Unit>;
5
/// A type representing a [`Point`] and [`Size`].
6
pub type Rect<T = f32, Unit = Unknown> = figures::SizedRect<T, Unit>;
7
/// A type representing a vector with magnitudes x and y.
8
pub type Vector<T = f32, Unit = Unknown> = figures::Vector<T, Unit>;
9
pub use figures::{ExtentsRect, Figure, Scale};
10
/// A type representing an angle of measurement.
11
pub type Angle = figures::Angle<f32>;
12

            
13
/// A unit representing physical pixels on a display.
14
// #[derive(Debug, Clone, Copy, Default)]
15
// pub struct Pixels;
16
pub type Pixels = figures::Pixels;
17

            
18
/// A unit representing [Desktop publishing points/PostScript points](https://en.wikipedia.org/wiki/Point_(typography)#Desktop_publishing_point). Measurements in this scale are equal to 1/72 of an [imperial inch](https://en.wikipedia.org/wiki/Inch).
19
// #[derive(Debug, Clone, Copy, Default)]
20
// pub struct Scaled;
21
pub type Scaled = figures::Scaled;
22

            
23
#[cfg(feature = "serde")]
24
use serde::{Deserialize, Serialize};
25

            
26
/// A unit representing
27
#[derive(Clone, Copy, Debug, Default)]
28
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29
pub struct Unknown;