Struct graphics_shapes::circle::Circle
source · pub struct Circle { /* private fields */ }Implementations§
source§impl Circle
impl Circle
pub fn as_rect(&self) -> Rect
sourcepub fn as_radius_line(&self) -> Line
pub fn as_radius_line(&self) -> Line
Create line from center to top edge at 0 degrees
pub fn as_horizontal_line(&self) -> Line
pub fn as_vertical_line(&self) -> Line
pub fn as_ellipse(&self) -> Ellipse
Trait Implementations§
source§impl PartialEq<Circle> for Circle
impl PartialEq<Circle> for Circle
source§impl Shape for Circle
impl Shape for Circle
source§fn from_points(points: &[Coord]) -> Selfwhere
Self: Sized,
fn from_points(points: &[Coord]) -> Selfwhere Self: Sized,
must be [center, edge]
source§fn translate_by<P: Into<Coord>>(&self, delta: P) -> Self
fn translate_by<P: Into<Coord>>(&self, delta: P) -> Self
change every point by +
deltasource§fn move_to<P: Into<Coord>>(&self, point: P) -> Self
fn move_to<P: Into<Coord>>(&self, point: P) -> Self
moves the shapes first point to
point
(and changes every other point to match their original distance and angle) Read moresource§fn outline_pixels(&self) -> Vec<Coord>
fn outline_pixels(&self) -> Vec<Coord>
the coords for drawing the shape outline, the points may be in any order
this should be cached rather than called per frame
source§fn filled_pixels(&self) -> Vec<Coord>
fn filled_pixels(&self) -> Vec<Coord>
the coords for drawing the filled shape, the points may be in any order
this should be cached rather than called per frame
source§fn move_center_to<P: Into<Coord>>(&self, point: P) -> Selfwhere
Self: Sized,
fn move_center_to<P: Into<Coord>>(&self, point: P) -> Selfwhere Self: Sized,
moves the shapes center to
point
(and changes every other point to match their original distance and angle) Read moresource§fn rotate_around<P: Into<Coord>>(&self, degrees: isize, point: P) -> Selfwhere
Self: Sized,
fn rotate_around<P: Into<Coord>>(&self, degrees: isize, point: P) -> Selfwhere Self: Sized,
rotate shape around a point
impl Eq for Circle
impl StructuralEq for Circle
impl StructuralPartialEq for Circle
Auto Trait Implementations§
impl RefUnwindSafe for Circle
impl Send for Circle
impl Sync for Circle
impl Unpin for Circle
impl UnwindSafe for Circle
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