[][src]Struct piet::UnitPoint

pub struct UnitPoint { /* fields omitted */ }

A representation of a point relative to a unit rectangle.

Methods

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_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Copy for UnitPoint[src]

impl Debug for UnitPoint[src]

Auto Trait Implementations

Blanket Implementations

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]