Module ratatui::widgets::canvas

source ·
Expand description

A Canvas and a collection of Shapes.

The Canvas is a blank space on which you can draw anything manually or use one of the predefined Shapes.

The available shapes are:

You can also implement your own custom Shapes.

Structs§

  • The Canvas widget provides a means to draw shapes (Lines, Rectangles, Circles, etc.) on a grid.
  • A circle with a given center and radius and with a given color
  • Holds the state of the Canvas when painting to it.
  • Label to draw some text on the canvas
  • A line from (x1, y1) to (x2, y2) with the given color
  • A world map
  • Painter is an abstraction over the Context that allows to draw shapes on the grid.
  • A group of points with a given color
  • A rectangle to draw on a Canvas

Enums§

Traits§