Function framebuffer_drawer::fill_rectangle
source · pub fn fill_rectangle<P: Pixel>(
framebuffer: &mut Framebuffer<P>,
coordinate: Coord,
width: usize,
height: usize,
pixel: P
)
Expand description
Fills a rectangle in a framebuffer with color. The part exceeding the boundary of the framebuffer will be ignored.
Arguments
framebuffer
: the framebuffer to draw in.coordinate
: the left top coordinate of the retangle relative to the origin(top-left point) of the framebuffer.width
: the width of the rectangle in number of pixels.height
: the height of the rectangle in number of pixels.pixel
: the value of pixels in the rectangle.