[][src]Struct tge::prelude::Region

pub struct Region<N: Number = f32> {
    pub x: N,
    pub y: N,
    pub width: N,
    pub height: N,
}

Fields

x: Ny: Nwidth: Nheight: N

Implementations

impl<N: Number> Region<N>[src]

pub fn new(x: N, y: N, width: N, height: N) -> Self[src]

pub fn position_size(position: Position<N>, size: Size<N>) -> Self[src]

pub fn min_max(min: Position<N>, max: Position<N>) -> Self[src]

pub fn edge(left: N, right: N, top: N, bottom: N) -> Self[src]

pub fn zero() -> Self[src]

pub fn none() -> Option<Self>[src]

pub fn position(&self) -> Position<N>[src]

pub fn set_position(&mut self, position: Position<N>)[src]

pub fn size(&self) -> Size<N>[src]

pub fn set_size(&mut self, size: Size<N>)[src]

pub fn min_x(&self) -> N[src]

pub fn set_min_x(&mut self, min_x: N)[src]

pub fn min_y(&self) -> N[src]

pub fn set_min_y(&mut self, min_y: N)[src]

pub fn min(&self) -> Position<N>[src]

pub fn set_min(&mut self, min: Position<N>)[src]

pub fn max_x(&self) -> N[src]

pub fn set_max_x(&mut self, max_x: N)[src]

pub fn max_y(&self) -> N[src]

pub fn set_max_y(&mut self, max_y: N)[src]

pub fn max(&self) -> Position<N>[src]

pub fn set_max(&mut self, max: Position<N>)[src]

pub fn left(&self) -> N[src]

pub fn set_left(&mut self, left: N)[src]

pub fn right(&self) -> N[src]

pub fn set_right(&mut self, right: N)[src]

pub fn top(&self) -> N[src]

pub fn set_top(&mut self, top: N)[src]

pub fn bottom(&self) -> N[src]

pub fn set_bottom(&mut self, bottom: N)[src]

pub fn top_left(&self) -> Position<N>[src]

pub fn top_right(&self) -> Position<N>[src]

pub fn bottom_left(&self) -> Position<N>[src]

pub fn bottom_right(&self) -> Position<N>[src]

Trait Implementations

impl<N: Clone + Number> Clone for Region<N>[src]

impl<N: Copy + Number> Copy for Region<N>[src]

impl<N: Debug + Number> Debug for Region<N>[src]

impl<N: Number> From<(N, N, N, N)> for Region<N>[src]

impl<N: Number> Into<(N, N, N, N)> for Region<N>[src]

impl<N: PartialEq + Number> PartialEq<Region<N>> for Region<N>[src]

impl<N: Number> StructuralPartialEq for Region<N>[src]

Auto Trait Implementations

impl<N> RefUnwindSafe for Region<N> where
    N: RefUnwindSafe

impl<N> Send for Region<N> where
    N: Send

impl<N> Sync for Region<N> where
    N: Sync

impl<N> Unpin for Region<N> where
    N: Unpin

impl<N> UnwindSafe for Region<N> where
    N: UnwindSafe

Blanket Implementations

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

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

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

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

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

impl<T> SetParameter for T

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

type Owned = T

The resulting type after obtaining ownership.

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.