[−][src]Struct turtle_graphics::Canvas
Methods
impl Canvas
[src]
pub fn new() -> Canvas
[src]
pub fn save_eps<W: Write>(&self, wr: &mut W) -> Result<()>
[src]
Saves the turtle graphic as Embedded Postscript (EPS)
pub fn save_svg<W: Write>(&self, wr: &mut W) -> Result<()>
[src]
Saves the turtle graphic as Scalable Vector Graphic (SVG).
Trait Implementations
impl Turtle for Canvas
[src]
fn forward<T: Into<Distance>>(&mut self, distance: T)
[src]
Move turtle forward by specified distance
.
fn rotate<T: Into<Degree>>(&mut self, angle: T)
[src]
fn move_forward<T: Into<Distance>>(&mut self, distance: T)
[src]
fn is_pen_down(&self) -> bool
[src]
fn pen_down(&mut self)
[src]
Put the pen down.
fn pen_up(&mut self)
[src]
Put the pen up.
fn goto(&mut self, position: Position)
[src]
Positions the turtle exactly at position
.
fn push(&mut self)
[src]
Push current turtle state on stack.
fn pop(&mut self)
[src]
Restore previously saved turtle state.
fn backward<T: Into<Distance>>(&mut self, distance: T)
[src]
Move turtle backward by specified distance
.
fn right<T: Into<Degree>>(&mut self, angle: T)
[src]
Turn turtle right by angle
degree.
fn left<T: Into<Degree>>(&mut self, angle: T)
[src]
Turn turtle left by angle
degree.
fn is_pen_up(&self) -> bool
[src]
Returns true
if pen is up.
fn home(&mut self)
[src]
Auto Trait Implementations
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,