draw_rectangle
Add rectangular shapes to pixel art projects by specifying coordinates and color, with options for outlines or filled areas to create sprites and animations.
Instructions
Draw a rectangle (outline or filled)
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": {
"projectId": "<projectId>",
"x0": "<x0>",
"y0": "<y0>",
"x1": "<x1>",
"y1": "<y1>",
"color": "<color>"
},
"name": "draw_rectangle"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| projectId | Yes | Project identifier | |
| layerIndex | No | Layer index (default: 0) | |
| frameIndex | No | Frame index (default: 0) | |
| x0 | Yes | Top-left X coordinate | |
| y0 | Yes | Top-left Y coordinate | |
| x1 | Yes | Bottom-right X coordinate | |
| y1 | Yes | Bottom-right Y coordinate | |
| color | Yes | Color in hex format | |
| filled | No | Whether to fill the rectangle (default: false) | |
| penSize | No | Stroke width for outline (default: 1) |