[−][src]Struct sdl2::rect::Point
Immutable point type, consisting of x and y.
Methods
impl Point
[src][−]
pub fn new(x: i32, y: i32) -> Point
[src][−]
Creates a new point from the given coordinates.
pub fn from_ll(raw: SDL_Point) -> Point
[src]
pub fn raw_slice(slice: &[Point]) -> *const SDL_Point
[src]
pub fn raw(self) -> *const SDL_Point
[src]
pub fn offset(self, x: i32, y: i32) -> Point
[src][−]
Returns a new point by shifting this point's coordinates by the given x and y values.
pub fn scale(self, f: i32) -> Point
[src][−]
Returns a new point by multiplying this point's coordinates by the given scale factor.
pub fn x(self) -> i32
[src][−]
Returns the x-coordinate of this point.
pub fn y(self) -> i32
[src][−]
Returns the y-coordinate of this point.
Trait Implementations
impl Add<Point> for Point
[src][+]
impl AddAssign<Point> for Point
[src][+]
impl AsMut<SDL_Point> for Point
[src][+]
impl AsRef<SDL_Point> for Point
[src][+]
impl Clone for Point
[src][+]
impl Copy for Point
[src]
impl Debug for Point
[src][+]
impl Deref for Point
[src][+]
impl DerefMut for Point
[src][+]
impl Div<i32> for Point
[src][+]
impl DivAssign<i32> for Point
[src][+]
impl Eq for Point
[src]
impl From<(i32, i32)> for Point
[src][+]
impl From<SDL_Point> for Point
[src][+]
impl Hash for Point
[src][+]
impl Into<(i32, i32)> for Point
[src][+]
impl Into<SDL_Point> for Point
[src][+]
impl Mul<i32> for Point
[src][+]
impl MulAssign<i32> for Point
[src][+]
impl Neg for Point
[src][+]
impl PartialEq<Point> for Point
[src][+]
impl Sub<Point> for Point
[src][+]
impl SubAssign<Point> for Point
[src][+]
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
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,
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,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src][+]
U: Into<T>,
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src][+]
U: TryFrom<T>,