[−][src]Struct texel_types::Position2D
2D position
Fields
x: i32y: i32Implementations
impl Position2D[src]
pub fn from_xy(x: i32, y: i32) -> Self[src]
pub fn apply(&mut self, translation: Translation, bounds: Bounds) -> bool[src]
Applies given Translation to this Position2D with regards to the provided
Bounds area. If Bounds is binding ensures position does not reach outside.
pub fn area(self, other: Position2D) -> Bounds[src]
Create bounds from two points
pub fn area_texels(self, dim: Dimension) -> Vec<Position2D>[src]
Create the list of all positions in given area from point with given dimension
Trait Implementations
impl Add<Position2D> for Position2D[src]
type Output = Position2D
The resulting type after applying the + operator.
fn add(self, other: Position2D) -> Self::Output[src]
impl Add<Position2D> for Position[src]
type Output = Position
The resulting type after applying the + operator.
fn add(self, other: Position2D) -> Self::Output[src]
impl AddAssign<Position2D> for Position[src]
fn add_assign(&mut self, other: Position2D)[src]
impl AddAssign<Position2D> for Position2D[src]
fn add_assign(&mut self, other: Position2D)[src]
impl Clone for Position2D[src]
fn clone(&self) -> Position2D[src]
fn clone_from(&mut self, source: &Self)1.0.0[src]
impl Copy for Position2D[src]
impl Debug for Position2D[src]
impl Default for Position2D[src]
impl Display for Position2D[src]
impl Eq for Position2D[src]
impl<'_> From<&'_ Position> for Position2D[src]
fn from(pos: &Position) -> Position2D[src]
impl<'_> From<&'_ mut Position> for Position2D[src]
fn from(pos: &mut Position) -> Position2D[src]
impl From<Position> for Position2D[src]
fn from(pos: Position) -> Position2D[src]
impl PartialEq<Position2D> for Position2D[src]
fn eq(&self, other: &Position2D) -> bool[src]
fn ne(&self, other: &Position2D) -> bool[src]
impl StructuralEq for Position2D[src]
impl StructuralPartialEq for Position2D[src]
impl Sub<Position> for Position2D[src]
type Output = Position2D
The resulting type after applying the - operator.
fn sub(self, other: Position) -> Self[src]
impl Sub<Position2D> for Bounds[src]
type Output = Bounds
The resulting type after applying the - operator.
fn sub(self, other: Position2D) -> Self::Output[src]
impl Sub<Position2D> for Position2D[src]
type Output = Position2D
The resulting type after applying the - operator.
fn sub(self, other: Self) -> Self[src]
impl SubAssign<Position2D> for Position2D[src]
fn sub_assign(&mut self, other: Position2D)[src]
Auto Trait Implementations
impl RefUnwindSafe for Position2D
impl Send for Position2D
impl Sync for Position2D
impl Unpin for Position2D
impl UnwindSafe for Position2D
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> 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> ToString for T where
T: Display + ?Sized, [src]
T: Display + ?Sized,
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>,