pub fn print_string<P: Pixel>(
    framebuffer: &mut Framebuffer<P>,
    coordinate: Coord,
    width: usize,
    height: usize,
    slice: &str,
    fg_pixel: P,
    bg_pixel: P,
    column: usize,
    line: usize
) -> (usize, usize, Rectangle)
Expand description

Prints a string in a framebuffer. Returns (column, line, rectangle), i.e. the position of the next symbol and an rectangle which covers the updated area. A block item (index, width) represents the index of line number and the width of charaters in this line as pixels. It can be viewed as a framebuffer block which is described in the framebuffer_compositor crate.

Arguments

  • framebuffer: the framebuffer to display in.
  • coordinate: the left top coordinate of the text block relative to the origin(top-left point) of the framebuffer.
  • width, height: the size of the text block in number of pixels.
  • slice: the string to display.
  • fg_pixel: the value of pixels in the foreground.
  • bg_pixel the value of pixels in the background.
  • column, line: the location of the text in the text block in number of characters.