Provides image drawing/modification capabilities
This module requires PIL (or Pillow) to be installed.
A mutable image
Acts as a regular Image, except it allows modifications.
Some operations, such as taking an ImageRegion, will work on an immutable copy of the canvas.
Parameters: | commands – An iterable of drawing commands to apply on the canvas right after creation |
---|
init arguments that become attributes:
drawing methods:
conversion:
internals:
- pil_image¶
The PIL image underlying this Canvas.
Note
Modifying the returned image is not guaranteed to have an effect.
In the future there might be Canvas implementations not based on PIL; their pil_image attribute might only give a copy of the data. If PIL is not installed, the attribute won’t be present at all.
Operations on a Canvas may be specified by command objects. This allows one to flexibly filter or modify a stream of drawing operations.