An example of
textual-canvas
being used in a Textual application
textual-canvas
provides a simple terminal-based drawing canvas widget for
use with Textual. Initially developed as a
widget for building
textual-mandelbrot
, it made
sense to spin it out into its own general-purpose library.
The package can be installed with pip
or related tools, for example:
$ pip install textual-canvas
The library provides one very simple widget for use in Textual: Canvas
.
This is a scrollable and focusable widget that can be used to colour
"pixels", acting as a basic building block for drawing other things. The
"pixels" themselves are half a character cell in height, hopefully coming
out roughly square in most environments.
See the documentation for an introduction, a usage guide and detailed API documentation.