Struct pathfinder::Link
[−]
[src]
pub struct Link<'a> { pub from: &'a Coordinate, pub to: &'a Coordinate, pub color: Rgba<u8>, }
Connects two Coordinate points.
Fields
from: &'a Coordinate
to: &'a Coordinate
color: Rgba<u8>
Methods
impl<'a> Link<'a>
[src]
pub fn new(from: &'a Coordinate, to: &'a Coordinate) -> Link<'a>
[src]
Creates a new Link and binds two nodes together.
Trait Implementations
impl<'a> Draw for Link<'a>
[src]
fn draw(
&self,
image: ImageBuffer<Rgba<u8>, Vec<u8>>,
x_offset: i16,
y_offset: i16,
size: u32
) -> ImageBuffer<Rgba<u8>, Vec<u8>>
[src]
&self,
image: ImageBuffer<Rgba<u8>, Vec<u8>>,
x_offset: i16,
y_offset: i16,
size: u32
) -> ImageBuffer<Rgba<u8>, Vec<u8>>
Draws the connection using either a modified version of Bresham's line algorithm or a generic one.