Struct graphics_shapes::rect::Rect
source · [−]pub struct Rect { /* private fields */ }
Implementations
sourceimpl Rect
impl Rect
sourcepub fn as_smallest_circle(&self) -> Circle
pub fn as_smallest_circle(&self) -> Circle
Create a circle around the center to the closest edge
sourcepub fn as_biggest_circle(&self) -> Circle
pub fn as_biggest_circle(&self) -> Circle
Create a circle around the center to the farthest edge
Trait Implementations
sourceimpl PartialEq<Rect> for Rect
impl PartialEq<Rect> for Rect
sourceimpl Shape for Rect
impl Shape for Rect
sourcefn from_points(points: Vec<Coord>) -> Selfwhere
Self: Sized,
fn from_points(points: Vec<Coord>) -> Selfwhere
Self: Sized,
create this shape from a list of points
fn rotate_around<P: Into<Coord>>(&self, degrees: isize, point: P) -> Selfwhere
Self: Sized,
sourcefn translate_by<P: Into<Coord>>(&self, delta: P) -> Selfwhere
Self: Sized,
fn translate_by<P: Into<Coord>>(&self, delta: P) -> Selfwhere
Self: Sized,
change every point by +delta
sourcefn move_to<P: Into<Coord>>(&self, point: P) -> Selfwhere
Self: Sized,
fn move_to<P: Into<Coord>>(&self, point: P) -> Selfwhere
Self: Sized,
moves the shapes first point to point
(and changes every other point to match their original distance and angle) Read more
fn rotate(&self, degrees: isize) -> Selfwhere
Self: Sized,
impl Eq for Rect
impl StructuralEq for Rect
impl StructuralPartialEq for Rect
Auto Trait Implementations
impl RefUnwindSafe for Rect
impl Send for Rect
impl Sync for Rect
impl Unpin for Rect
impl UnwindSafe for Rect
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more