draw_polygon
Draw closed polygons through specified points in an Aseprite sprite, choosing filled or outline-only shapes clipped to the canvas.
Instructions
Draw a closed polygon through the points: filled (with its outline) or outline only.
Filling uses the even-odd rule, so self-intersecting shapes leave the overlapping parts empty. Clipped to the canvas.
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": {
"path": "<path>",
"points": "<points>",
"color": "<color>"
},
"name": "draw_polygon"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fill | No | Fill the shape; false draws the outline only | |
| path | Yes | Sprite file. Relative paths resolve against the server root. | |
| blend | No | false: pixels get exactly this colour (transparent erases, except on a background layer, which ignores alpha); true: the colour is alpha-blended over what is there | |
| color | Yes | '#RRGGBB', '#RRGGBBAA' or 'transparent' | |
| frame | No | 1-based frame number | |
| layer | No | Layer name or 'group/child' path; empty = the bottom-most normal layer | |
| points | Yes | Corners as {x, y}, in order | |
| create_cel | No | Add an empty cel when the layer has none in that frame |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||