Paint: Clear or erase an area
paint_clearClears rectangular or elliptical areas on a canvas layer to a color, or erases to transparency; can also clear the entire layer.
Instructions
Wipes a rectangle (whole layer when area omitted) to color; color:null erases to transparency. shape:'ellipse' and radius round the mask.
Target the canvas by name (created with paint_canvas) and optionally a layer index. Layers, filters and undo work the same for every drawing tool.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| area | No | Restrict to a rectangle; omit for the whole canvas | |
| color | No | Fill colour, or null to erase to transparent | |
| layer | No | Target layer index; defaults to the active layer (see paint_canvas). | |
| shape | No | rect | |
| canvas | Yes | Canvas name. Letters, digits, space, dot, dash, plus; the .png/.paint suffix may be included or omitted. | |
| radius | No | ||
| opacity | No | ||
| preview | No | Image reply: auto/thumb = downscaled picture back into the result, full = unpixelated, none = text only | |
| preview_size | No | Longest edge of the returned thumbnail |