Struct firefly_rust::graphics::Point  
source · 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§y: i32Implementations§
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 PartialEq for Point
 
impl PartialEq for Point
source§impl PartialOrd for Point
 
impl PartialOrd for Point
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
 
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for 
self and other) and is used by the <=
operator. Read moresource§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
source§impl<SS, SP> SupersetOf<SS> for SPwhere
    SS: SubsetOf<SP>,
 
impl<SS, SP> SupersetOf<SS> for SPwhere
    SS: SubsetOf<SP>,
source§fn to_subset(&self) -> Option<SS>
 
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct 
self from the equivalent element of its
superset. Read moresource§fn is_in_subset(&self) -> bool
 
fn is_in_subset(&self) -> bool
Checks if 
self is actually part of its subset T (and can be converted to it).source§fn to_subset_unchecked(&self) -> SS
 
fn to_subset_unchecked(&self) -> SS
Use with care! Same as 
self.to_subset but without any property checks. Always succeeds.source§fn from_subset(element: &SS) -> SP
 
fn from_subset(element: &SS) -> SP
The inclusion map: converts 
self to the equivalent element of its superset.