[−]Struct druid::UnitPoint
A representation of a point relative to a unit rectangle.
Implementations
impl UnitPoint
pub const TOP_LEFT: UnitPoint
pub const TOP: UnitPoint
pub const TOP_RIGHT: UnitPoint
pub const LEFT: UnitPoint
pub const CENTER: UnitPoint
pub const RIGHT: UnitPoint
pub const BOTTOM_LEFT: UnitPoint
pub const BOTTOM: UnitPoint
pub const BOTTOM_RIGHT: UnitPoint
pub const fn new(u: f64, v: f64) -> UnitPoint
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
Given a rectangle, resolve the point within the rectangle.
Trait Implementations
impl Clone for UnitPoint
fn clone(&self) -> UnitPoint
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for UnitPoint
impl Debug for UnitPoint
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> RoundFrom<T> for T
fn round_from(x: T) -> T
impl<T, U> RoundInto<U> for T where
U: RoundFrom<T>,
U: RoundFrom<T>,
fn round_into(self) -> U
impl<T> Same<T> for T
type Output = T
Should always be Self
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>,