pub struct Point {
pub x: i32,
pub y: i32,
}
Expand description
A point on the screen.
Typically, the upper-left corner of a bounding box of a shape.
Fields§
§x: i32
Pixel distance from left.
y: i32
Pixel distance from the top.
Implementations§
Source§impl Point
impl Point
Sourcepub fn component_min(self, other: Self) -> Self
pub fn component_min(self, other: Self) -> Self
Set both x and y to their minimum in the two given points.
Sourcepub fn component_max(self, other: Self) -> Self
pub fn component_max(self, other: Self) -> Self
Set both x and y to their maximum in the two given points.
Trait Implementations§
Source§impl AddAssign<Size> for Point
impl AddAssign<Size> for Point
Source§fn add_assign(&mut self, other: Size)
fn add_assign(&mut self, other: Size)
Performs the
+=
operation. Read moreSource§impl AddAssign for Point
impl AddAssign for Point
Source§fn add_assign(&mut self, other: Point)
fn add_assign(&mut self, other: 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 Ord for Point
impl Ord for Point
Source§impl PartialOrd for Point
impl PartialOrd for Point
Source§impl SubAssign<Size> for Point
impl SubAssign<Size> for Point
Source§fn sub_assign(&mut self, other: Size)
fn sub_assign(&mut self, other: Size)
Performs the
-=
operation. Read moreSource§impl SubAssign for Point
impl SubAssign for Point
Source§fn sub_assign(&mut self, other: Point)
fn sub_assign(&mut self, other: Point)
Performs the
-=
operation. Read moreimpl Copy for Point
impl Eq for Point
impl StructuralPartialEq for Point
Auto Trait Implementations§
impl Freeze for Point
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