[][src]Struct turtle_graphics::Canvas

pub struct Canvas { /* fields omitted */ }

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 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

impl Send for Canvas

impl Sync for Canvas

Blanket Implementations

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]