line
Draw a pixel line using Bresenham's algorithm. Use no_doubles to get pixel-perfect diagonals without L-shaped double pixels.
Instructions
Draw a Bresenham line. no_doubles removes L-shaped double pixels for pixel-perfect diagonals.
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": {
"doc_id": "<doc_id>",
"x1": "<x1>",
"y1": "<y1>",
"x2": "<x2>",
"y2": "<y2>",
"index": "<index>"
},
"name": "line"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x1 | Yes | ||
| x2 | Yes | ||
| y1 | Yes | ||
| y2 | Yes | ||
| clip | No | Silently discard out-of-bounds pixels instead of rejecting (default false) | |
| frame | No | Frame index, 0-based (default: active frame) | |
| index | Yes | Palette index | |
| layer | No | Layer id or name (default: active layer) | |
| doc_id | Yes | Document id | |
| render | No | Include a render of the change (default true) | |
| no_doubles | No | ||
| ignore_symmetry | No | Skip symmetry mirroring for this call (default false) |