Paint: Polygon or polyline
paint_polygonDraw filled or outlined polygons from [x,y] point lists on a named canvas—ideal for stars, arrows, and speech bubbles, with optional layers and gradients.
Instructions
Any many-sided shape from [x,y] points — stars, arrows, speech bubbles. closed:false strokes the outline only.
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.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"canvas": "<canvas>",
"points": "<points>"
},
"name": "paint_polygon"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fill | No | A colour, or a gradient object {type, from, to, radius, colors|stops} | |
| blend | No | Blend mode for this stroke | normal |
| layer | No | Target layer index; defaults to the active layer (see paint_canvas). | |
| canvas | Yes | Canvas name. Letters, digits, space, dot, dash, plus; the .png/.paint suffix may be included or omitted. | |
| closed | No | ||
| points | Yes | Corners as [[x,y], …] | |
| stroke | No | A colour, or a gradient object {type, from, to, radius, colors|stops} | |
| opacity | No | 0..1 strength of this stroke | |
| preview | No | Image reply: auto/thumb = downscaled picture back into the result, full = unpixelated, none = text only | |
| even_odd | No | Even-odd rule, needed for self-crossing stars | |
| preview_size | No | Longest edge of the returned thumbnail | |
| stroke_width | No |