Paint API#
Bases: AnyWidget
Notebook-friendly paint widget with MS Paint style tools and PIL helpers.
Examples:
Create a Paint widget.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
height
|
int
|
Canvas height in pixels. |
DEFAULT_HEIGHT
|
width
|
int
|
Canvas width in pixels (ignored when |
DEFAULT_WIDTH
|
store_background
|
bool
|
Persist previous strokes when background changes. |
True
|
init_image
|
Optional[Any]
|
Optional path/URL/PIL image/bytes to preload. |
None
|
Source code in wigglystuff/paint.py
Synced traitlets#
| Traitlet | Type | Notes |
|---|---|---|
base64 |
str |
PNG data URL or raw base64 payload. |
width |
int |
Canvas width in pixels. |
height |
int |
Canvas height in pixels. |
store_background |
bool |
Persist strokes when background changes. |