art.canvas.draw_rect
Draw a rectangle on a canvas by specifying top-left coordinates, width, height, and color. Choose solid fill or outline to add game art elements.
Instructions
Draw a rectangle on the canvas.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x | Yes | Top-left X coordinate | |
| y | Yes | Top-left Y coordinate | |
| color | Yes | Fill/stroke color as hex string | |
| width | Yes | Rectangle width | |
| filled | No | Whether to fill the rectangle (default true) | |
| height | Yes | Rectangle height | |
| session_id | Yes | Canvas session ID |