[−][src]Struct guion::util::bounds::Bounds
Fields
off: Offset
size: Dims
Methods
impl Bounds
[src]
pub const fn from_xywh(x: i32, y: i32, w: u32, h: u32) -> Self
[src]
pub const fn from_xy(x: i32, y: i32) -> Self
[src]
pub const fn from_wh(w: u32, h: u32) -> Self
[src]
pub const fn from_off(off: Offset) -> Self
[src]
pub const fn from_size(size: Dims) -> Self
[src]
pub fn x(&self) -> i32
[src]
pub fn y(&self) -> i32
[src]
pub fn w(&self) -> u32
[src]
pub fn h(&self) -> u32
[src]
pub fn x_mut(&mut self) -> &mut i32
[src]
pub fn y_mut(&mut self) -> &mut i32
[src]
pub fn w_mut(&mut self) -> &mut u32
[src]
pub fn h_mut(&mut self) -> &mut u32
[src]
pub fn x1(&self) -> i32
[src]
pub fn y1(&self) -> i32
[src]
pub fn inside_border(&self, b: &Border) -> Self
[src]
get the bounds inside this bound (subtract border)
pub fn slice(&self, inner_relative: &Bounds) -> Self
[src]
b is the inner and relative to self get the part of the inner which also is inside this bound
pub fn step(&self, step: i32) -> Self
[src]
pub fn inner_centered(&self, s: Dims) -> Self
[src]
get bound with size s and centered relative to self
pub fn from_ori(
par_off: i32,
unpar_off: i32,
par_size: u32,
unpar_size: u32,
o: Orientation
) -> Self
[src]
par_off: i32,
unpar_off: i32,
par_size: u32,
unpar_size: u32,
o: Orientation
) -> Self
pub fn par(&self, o: Orientation) -> (i32, u32)
[src]
pub fn unpar(&self, o: Orientation) -> (i32, u32)
[src]
Trait Implementations
impl<'_> Add<&'_ Offset> for Bounds
[src]
type Output = Bounds
The resulting type after applying the +
operator.
fn add(self, r: &Offset) -> Self::Output
[src]
impl<'a, '_> Add<&'_ Offset> for &'a Bounds
[src]
type Output = Bounds
The resulting type after applying the +
operator.
fn add(self, r: &Offset) -> Self::Output
[src]
impl<'a, '_> Add<&'_ Offset> for &'a mut Bounds
[src]
type Output = Bounds
The resulting type after applying the +
operator.
fn add(self, r: &Offset) -> Self::Output
[src]
impl<'_> Add<&'_ mut Offset> for Bounds
[src]
type Output = Bounds
The resulting type after applying the +
operator.
fn add(self, r: &mut Offset) -> Self::Output
[src]
impl<'a, '_> Add<&'_ mut Offset> for &'a Bounds
[src]
type Output = Bounds
The resulting type after applying the +
operator.
fn add(self, r: &mut Offset) -> Self::Output
[src]
impl<'a, '_> Add<&'_ mut Offset> for &'a mut Bounds
[src]
type Output = Bounds
The resulting type after applying the +
operator.
fn add(self, r: &mut Offset) -> Self::Output
[src]
impl Add<Offset> for Bounds
[src]
type Output = Bounds
The resulting type after applying the +
operator.
fn add(self, r: Offset) -> Self::Output
[src]
impl<'a> Add<Offset> for &'a Bounds
[src]
type Output = Bounds
The resulting type after applying the +
operator.
fn add(self, r: Offset) -> Self::Output
[src]
impl<'a> Add<Offset> for &'a mut Bounds
[src]
type Output = Bounds
The resulting type after applying the +
operator.
fn add(self, r: Offset) -> Self::Output
[src]
impl<'_> AddAssign<&'_ Offset> for Bounds
[src]
fn add_assign(&mut self, r: &Offset)
[src]
impl<'a, '_> AddAssign<&'_ Offset> for &'a mut Bounds
[src]
fn add_assign(&mut self, r: &Offset)
[src]
impl<'_> AddAssign<&'_ mut Offset> for Bounds
[src]
fn add_assign(&mut self, r: &mut Offset)
[src]
impl<'a, '_> AddAssign<&'_ mut Offset> for &'a mut Bounds
[src]
fn add_assign(&mut self, r: &mut Offset)
[src]
impl AddAssign<Offset> for Bounds
[src]
fn add_assign(&mut self, r: Offset)
[src]
impl<'a> AddAssign<Offset> for &'a mut Bounds
[src]
fn add_assign(&mut self, r: Offset)
[src]
impl<'_> BitAnd<&'_ Bounds> for Bounds
[src]
type Output = Bounds
The resulting type after applying the &
operator.
fn bitand(self, r: &Bounds) -> Self::Output
[src]
impl<'a, '_> BitAnd<&'_ Bounds> for &'a Bounds
[src]
type Output = Bounds
The resulting type after applying the &
operator.
fn bitand(self, r: &Bounds) -> Self::Output
[src]
impl<'a, '_> BitAnd<&'_ Bounds> for &'a mut Bounds
[src]
type Output = Bounds
The resulting type after applying the &
operator.
fn bitand(self, r: &Bounds) -> Self::Output
[src]
impl<'_> BitAnd<&'_ mut Bounds> for Bounds
[src]
type Output = Bounds
The resulting type after applying the &
operator.
fn bitand(self, r: &mut Bounds) -> Self::Output
[src]
impl<'a, '_> BitAnd<&'_ mut Bounds> for &'a Bounds
[src]
type Output = Bounds
The resulting type after applying the &
operator.
fn bitand(self, r: &mut Bounds) -> Self::Output
[src]
impl<'a, '_> BitAnd<&'_ mut Bounds> for &'a mut Bounds
[src]
type Output = Bounds
The resulting type after applying the &
operator.
fn bitand(self, r: &mut Bounds) -> Self::Output
[src]
impl BitAnd<Bounds> for Bounds
[src]
type Output = Bounds
The resulting type after applying the &
operator.
fn bitand(self, r: Bounds) -> Self::Output
[src]
impl<'a> BitAnd<Bounds> for &'a Bounds
[src]
type Output = Bounds
The resulting type after applying the &
operator.
fn bitand(self, r: Bounds) -> Self::Output
[src]
impl<'a> BitAnd<Bounds> for &'a mut Bounds
[src]
type Output = Bounds
The resulting type after applying the &
operator.
fn bitand(self, r: Bounds) -> Self::Output
[src]
impl<'_> BitAndAssign<&'_ Bounds> for Bounds
[src]
fn bitand_assign(&mut self, r: &Bounds)
[src]
impl<'a, '_> BitAndAssign<&'_ Bounds> for &'a mut Bounds
[src]
fn bitand_assign(&mut self, r: &Bounds)
[src]
impl<'_> BitAndAssign<&'_ mut Bounds> for Bounds
[src]
fn bitand_assign(&mut self, r: &mut Bounds)
[src]
impl<'a, '_> BitAndAssign<&'_ mut Bounds> for &'a mut Bounds
[src]
fn bitand_assign(&mut self, r: &mut Bounds)
[src]
impl BitAndAssign<Bounds> for Bounds
[src]
fn bitand_assign(&mut self, r: Bounds)
[src]
impl<'a> BitAndAssign<Bounds> for &'a mut Bounds
[src]
fn bitand_assign(&mut self, r: Bounds)
[src]
impl Clone for Bounds
[src]
impl Copy for Bounds
[src]
impl Default for Bounds
[src]
impl<'_> Sub<&'_ Offset> for Bounds
[src]
type Output = Bounds
The resulting type after applying the -
operator.
fn sub(self, r: &Offset) -> Self::Output
[src]
impl<'a, '_> Sub<&'_ Offset> for &'a Bounds
[src]
type Output = Bounds
The resulting type after applying the -
operator.
fn sub(self, r: &Offset) -> Self::Output
[src]
impl<'a, '_> Sub<&'_ Offset> for &'a mut Bounds
[src]
type Output = Bounds
The resulting type after applying the -
operator.
fn sub(self, r: &Offset) -> Self::Output
[src]
impl<'_> Sub<&'_ mut Offset> for Bounds
[src]
type Output = Bounds
The resulting type after applying the -
operator.
fn sub(self, r: &mut Offset) -> Self::Output
[src]
impl<'a, '_> Sub<&'_ mut Offset> for &'a Bounds
[src]
type Output = Bounds
The resulting type after applying the -
operator.
fn sub(self, r: &mut Offset) -> Self::Output
[src]
impl<'a, '_> Sub<&'_ mut Offset> for &'a mut Bounds
[src]
type Output = Bounds
The resulting type after applying the -
operator.
fn sub(self, r: &mut Offset) -> Self::Output
[src]
impl Sub<Offset> for Bounds
[src]
type Output = Bounds
The resulting type after applying the -
operator.
fn sub(self, r: Offset) -> Self::Output
[src]
impl<'a> Sub<Offset> for &'a Bounds
[src]
type Output = Bounds
The resulting type after applying the -
operator.
fn sub(self, r: Offset) -> Self::Output
[src]
impl<'a> Sub<Offset> for &'a mut Bounds
[src]
type Output = Bounds
The resulting type after applying the -
operator.
fn sub(self, r: Offset) -> Self::Output
[src]
impl<'_> SubAssign<&'_ Offset> for Bounds
[src]
fn sub_assign(&mut self, r: &Offset)
[src]
impl<'a, '_> SubAssign<&'_ Offset> for &'a mut Bounds
[src]
fn sub_assign(&mut self, r: &Offset)
[src]
impl<'_> SubAssign<&'_ mut Offset> for Bounds
[src]
fn sub_assign(&mut self, r: &mut Offset)
[src]
impl<'a, '_> SubAssign<&'_ mut Offset> for &'a mut Bounds
[src]
fn sub_assign(&mut self, r: &mut Offset)
[src]
impl SubAssign<Offset> for Bounds
[src]
fn sub_assign(&mut self, r: Offset)
[src]
impl<'a> SubAssign<Offset> for &'a mut Bounds
[src]
fn sub_assign(&mut self, r: Offset)
[src]
Auto Trait Implementations
impl RefUnwindSafe for Bounds
impl Send for Bounds
impl Sync for Bounds
impl Unpin for Bounds
impl UnwindSafe for Bounds
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> AtomState<T> for T where
T: Copy,
[src]
T: Copy,
impl<T> AtomStateMut<T> for T where
T: Copy,
[src]
T: Copy,
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>,