Function framebuffer_drawer::draw_line
source · pub fn draw_line<P: Pixel>(
framebuffer: &mut Framebuffer<P>,
start: Coord,
end: Coord,
pixel: P
)Expand description
Draws a line in a framebuffer. The part exceeding the boundary of the framebuffer will be ignored.
Arguments
framebuffer: the framebuffer to draw in.start: the start coordinate of the line relative to the origin(top-left point) of the framebuffer.end: the end coordinate of the line relative to the origin(top-left point) of the framebuffer.color: the color of the line.