[][src]Struct line_drawing::Supercover

pub struct Supercover<T> { /* fields omitted */ }

Like WalkGrid but takes diagonal steps if the line passes directly over a corner.

See this section of the article for an interactive demonstration.

This algorithm should always be symetrical.

Example:

extern crate line_drawing;
use line_drawing::Supercover;

fn main() {
    for (x, y) in Supercover::new((0, 0), (5, 5)) {
        print!("({}, {}), ", x, y);
    }
}
(0, 0), (1, 1), (2, 2), (3, 3), (4, 4), (5, 5),

Methods

impl<T: SignedNum> Supercover<T>[src]

pub fn new(start: Point<T>, end: Point<T>) -> Self[src]

Important traits for Steps<T, I>
pub fn steps(self) -> Steps<Point<T>, Self>[src]

Trait Implementations

impl<T: SignedNum> Iterator for Supercover<T>[src]

type Item = Point<T>

The type of the elements being iterated over.

Auto Trait Implementations

impl<T> Send for Supercover<T> where
    T: Send

impl<T> Unpin for Supercover<T> where
    T: Unpin

impl<T> Sync for Supercover<T> where
    T: Sync

impl<T> UnwindSafe for Supercover<T> where
    T: UnwindSafe

impl<T> RefUnwindSafe for Supercover<T> where
    T: RefUnwindSafe

Blanket Implementations

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

impl<I> IntoIterator for I where
    I: Iterator
[src]

type Item = <I as Iterator>::Item

The type of the elements being iterated over.

type IntoIter = I

Which kind of iterator are we turning this into?

impl<T> From<T> for 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]