imageproc::drawing

Function draw_line_segment

Source
pub fn draw_line_segment<I>(
    image: &I,
    start: (f32, f32),
    end: (f32, f32),
    color: I::Pixel,
) -> Image<I::Pixel>
where I: GenericImage,
Expand description

Draws a line segment on a new copy of an image.

Draws as much of the line segment between start and end as lies inside the image bounds.

Uses Bresenham’s line drawing algorithm.