Struct ggez::graphics::Point
[−]
pub struct Point { /* fields omitted */ }
Immutable point type, consisting of x and y.
Methods
impl Point
fn new(x: i32, y: i32) -> Point
Creates a new point from the given coordinates.
fn from_ll(raw: SDL_Point) -> Point
fn raw_slice(slice: &[Point]) -> *const SDL_Point
fn raw(&self) -> *const SDL_Point
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.
fn scale(&self, f: i32) -> Point
Returns a new point by multiplying this point's coordinates by the given scale factor.
fn x(&self) -> i32
Returns the x-coordinate of this point.
fn y(&self) -> i32
Returns the y-coordinate of this point.
Trait Implementations
impl Div<i32> for Point
impl Add<Point> for Point
impl Neg for Point
impl Debug for Point
fn fmt(&self, __arg_0: &mut Formatter) -> Result<(), Error>
Formats the value using the given formatter.
impl Clone for Point
fn clone(&self) -> Point
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl Hash for Point
impl Into<(i32, i32)> for Point
impl Sub<Point> for Point
impl PartialEq<Point> for Point
fn eq(&self, __arg_0: &Point) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Point) -> bool
This method tests for !=
.