[−][src]Struct piet::UnitPoint
A representation of a point relative to a unit rectangle.
Implementations
impl UnitPoint
[src]
pub const TOP_LEFT: UnitPoint
[src]
pub const TOP: UnitPoint
[src]
pub const TOP_RIGHT: UnitPoint
[src]
pub const LEFT: UnitPoint
[src]
pub const CENTER: UnitPoint
[src]
pub const RIGHT: UnitPoint
[src]
pub const BOTTOM_LEFT: UnitPoint
[src]
pub const BOTTOM: UnitPoint
[src]
pub const BOTTOM_RIGHT: UnitPoint
[src]
pub const fn new(u: f64, v: f64) -> UnitPoint
[src]
Create a new UnitPoint.
The u
and v
coordinates describe the point, with (0.0, 0.0) being
the top-left, and (1.0, 1.0) being the bottom-right.
pub fn resolve(self, rect: Rect) -> Point
[src]
Given a rectangle, resolve the point within the rectangle.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for UnitPoint
impl Send for UnitPoint
impl Sync for UnitPoint
impl Unpin for UnitPoint
impl UnwindSafe for UnitPoint
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,