[−][src]Struct piet::UnitPoint
A representation of a point relative to a unit rectangle.
Fields
u: f64v: f64Methods
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
impl Clone for UnitPoint[src]
fn clone(&self) -> UnitPoint[src]
fn clone_from(&mut self, source: &Self)1.0.0[src]
impl Copy for UnitPoint[src]
impl Debug for UnitPoint[src]
Auto Trait Implementations
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, 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>,