pub struct Point { /* private fields */ }
Expand description
Immutable point type, consisting of x and y.
Implementations§
source§impl Point
impl Point
pub fn from_ll(raw: SDL_Point) -> Point
pub fn raw_slice(slice: &[Point]) -> *const SDL_Point
pub fn raw(&self) -> *const SDL_Point
sourcepub fn offset(self, x: i32, y: i32) -> Point
pub fn offset(self, x: i32, y: i32) -> Point
Returns a new point by shifting this point’s coordinates by the given x and y values.
Trait Implementations§
source§impl AddAssign for Point
impl AddAssign for Point
source§fn add_assign(&mut self, rhs: Point)
fn add_assign(&mut self, rhs: Point)
Performs the
+=
operation. Read moresource§impl DivAssign<i32> for Point
impl DivAssign<i32> for Point
source§fn div_assign(&mut self, rhs: i32)
fn div_assign(&mut self, rhs: i32)
Performs the
/=
operation. Read moresource§impl MulAssign<i32> for Point
impl MulAssign<i32> for Point
source§fn mul_assign(&mut self, rhs: i32)
fn mul_assign(&mut self, rhs: i32)
Performs the
*=
operation. Read moresource§impl PartialEq for Point
impl PartialEq for Point
source§impl SubAssign for Point
impl SubAssign for Point
source§fn sub_assign(&mut self, rhs: Point)
fn sub_assign(&mut self, rhs: Point)
Performs the
-=
operation. Read moreimpl Copy for Point
impl Eq for Point
Auto Trait Implementations§
impl RefUnwindSafe for Point
impl Send for Point
impl Sync for Point
impl Unpin for Point
impl UnwindSafe for Point
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more