Struct graphics_shapes::line::Line
source · pub struct Line { /* private fields */ }Implementations§
Trait Implementations§
source§impl PartialEq<Line> for Line
impl PartialEq<Line> for Line
source§impl Shape for Line
impl Shape for Line
source§fn from_points(points: &[Coord]) -> Selfwhere
Self: Sized,
fn from_points(points: &[Coord]) -> Selfwhere Self: Sized,
create this shape from a list of points (corners of a shape or tips of a line)
source§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 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 +
deltasource§fn 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 moresource§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 Line
impl StructuralEq for Line
impl StructuralPartialEq for Line
Auto Trait Implementations§
impl RefUnwindSafe for Line
impl Send for Line
impl Sync for Line
impl Unpin for Line
impl UnwindSafe for Line
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