[][src]Trait pathfinder::Shape

pub trait Shape {
    fn new() -> Self;
fn area(&self, size: u32) -> Vec<Coordinate>; }

Provides the functions to create a generic shape.

Required methods

fn new() -> Self

fn area(&self, size: u32) -> Vec<Coordinate>

Loading content...

Implementors

impl Shape for Circle
[src]

fn area(&self, size: u32) -> Vec<Coordinate>
[src]

Returns all coordinates that the shape occupies. Algorithm is derived from: https://en.wikipedia.org/wiki/Midpoint_circle_algorithm

impl Shape for Square
[src]

fn area(&self, size: u32) -> Vec<Coordinate>
[src]

Returns all coordinates that the shape occupies. Assume that 0 0 is the center of the node.

impl Shape for Triangle
[src]

fn area(&self, size: u32) -> Vec<Coordinate>
[src]

Returns all coordinates that the shape occupies. Assume that you start at coordinate x: 0, y: 0.

Loading content...