Expand description

This crate contains a series of basic draw functions to draw onto a framebuffer. Displayables invoke these basic functions to display themselves onto a framebuffer. The coordinate in these interfaces is relative to the origin(top-left point) of the framebuffer.

Functions

  • Draw a circle in the framebuffer. coordinate is the position of the center of the circle relative to the top-left corner of the framebuffer and r is the radius
  • Draws a line in a framebuffer. The part exceeding the boundary of the framebuffer will be ignored.
  • Draws a rectangle in a framebuffer. The part exceeding the boundary of the framebuffer will be ignored.
  • Fills a rectangle in a framebuffer with color. The part exceeding the boundary of the framebuffer will be ignored.