Struct dcc_lsystem::turtle::BaseTurtle [−][src]
pub struct BaseTurtle { /* fields omitted */ }
Implementations
impl BaseTurtle
[src]
impl BaseTurtle
[src]pub fn lines(&self) -> &[(i32, i32, i32, i32)]
[src]
pub fn lines(&self) -> &[(i32, i32, i32, i32)]
[src]Returns a slice containing all the lines (x1, y1, x2, y2)
traversed by the turtle.
pub fn set_position(&mut self, x: i32, y: i32)
[src]
pub fn set_position(&mut self, x: i32, y: i32)
[src]Set the current position of this turtle to (x,y)
.
pub fn delta_move(&mut self, dx: i32, dy: i32)
[src]
pub fn delta_move(&mut self, dx: i32, dy: i32)
[src]Moves the turtle by (dx,dy)
.
pub fn bounds(&self) -> (u32, u32, i32, i32)
[src]
pub fn bounds(&self) -> (u32, u32, i32, i32)
[src]Returns (total_width, total_height, min_x, min_y)
, where
total_width
(respectively total_height) is the largest horizontal (respectively vertical) distance between any two points that the turtle visited,
min_x(respectively
min_y`) is the smallest horizontal (respectively vertical) position that
the turtle visited.
This is useful for converting from turtle coordinates to a new coordinate system starting at (0,0)
with width total_width
, height total_height
, and all positions have positive x
and y
coordinates.
Trait Implementations
impl Clone for BaseTurtle
[src]
impl Clone for BaseTurtle
[src]fn clone(&self) -> BaseTurtle
[src]
fn clone(&self) -> BaseTurtle
[src]Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]Performs copy-assignment from source
. Read more
impl Debug for BaseTurtle
[src]
impl Debug for BaseTurtle
[src]Auto Trait Implementations
impl RefUnwindSafe for BaseTurtle
impl Send for BaseTurtle
impl Sync for BaseTurtle
impl Unpin for BaseTurtle
impl UnwindSafe for BaseTurtle
Blanket Implementations
impl<Src, Scheme> ApproxFrom<Src, Scheme> for Src where
Scheme: ApproxScheme,
impl<Src, Scheme> ApproxFrom<Src, Scheme> for Src where
Scheme: ApproxScheme,
type Err = NoError
type Err = NoError
The error type produced by a failed conversion.
pub fn approx_from(
src: Src
) -> Result<Src, <Src as ApproxFrom<Src, Scheme>>::Err>
pub fn approx_from(
src: Src
) -> Result<Src, <Src as ApproxFrom<Src, Scheme>>::Err>
Convert the given value into an approximately equivalent representation.
impl<Dst, Src, Scheme> ApproxInto<Dst, Scheme> for Src where
Dst: ApproxFrom<Src, Scheme>,
Scheme: ApproxScheme,
impl<Dst, Src, Scheme> ApproxInto<Dst, Scheme> for Src where
Dst: ApproxFrom<Src, Scheme>,
Scheme: ApproxScheme,
type Err = <Dst as ApproxFrom<Src, Scheme>>::Err
type Err = <Dst as ApproxFrom<Src, Scheme>>::Err
The error type produced by a failed conversion.
pub fn approx_into(self) -> Result<Dst, <Src as ApproxInto<Dst, Scheme>>::Err>
pub fn approx_into(self) -> Result<Dst, <Src as ApproxInto<Dst, Scheme>>::Err>
Convert the subject into an approximately equivalent representation.
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> ConvUtil for T
impl<T> ConvUtil for T
fn approx_as<Dst>(self) -> Result<Dst, Self::Err> where
Self: ApproxInto<Dst, DefaultApprox>,
fn approx_as<Dst>(self) -> Result<Dst, Self::Err> where
Self: ApproxInto<Dst, DefaultApprox>,
Approximate the subject to a given type with the default scheme.
fn approx_as_by<Dst, Scheme>(self) -> Result<Dst, Self::Err> where
Self: ApproxInto<Dst, Scheme>,
Scheme: ApproxScheme,
fn approx_as_by<Dst, Scheme>(self) -> Result<Dst, Self::Err> where
Self: ApproxInto<Dst, Scheme>,
Scheme: ApproxScheme,
Approximate the subject to a given type with a specific scheme.
impl<T> Pointable for T
impl<T> Pointable for T
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
pub fn vzip(self) -> V
impl<Src> ValueFrom<Src> for Src
impl<Src> ValueFrom<Src> for Src
type Err = NoError
type Err = NoError
The error type produced by a failed conversion.
pub fn value_from(src: Src) -> Result<Src, <Src as ValueFrom<Src>>::Err>
pub fn value_from(src: Src) -> Result<Src, <Src as ValueFrom<Src>>::Err>
Convert the given value into an exactly equivalent representation.
impl<Src, Dst> ValueInto<Dst> for Src where
Dst: ValueFrom<Src>,
impl<Src, Dst> ValueInto<Dst> for Src where
Dst: ValueFrom<Src>,
type Err = <Dst as ValueFrom<Src>>::Err
type Err = <Dst as ValueFrom<Src>>::Err
The error type produced by a failed conversion.
pub fn value_into(self) -> Result<Dst, <Src as ValueInto<Dst>>::Err>
pub fn value_into(self) -> Result<Dst, <Src as ValueInto<Dst>>::Err>
Convert the subject into an exactly equivalent representation.