draw_line
Draws a straight line on a GIMP layer between two coordinates, with configurable color, width, and pencil or paintbrush stroke style.
Instructions
Draw a straight line on a layer.
Parameters:
x1, y1: Start point
x2, y2: End point
color: Stroke color (CSS / hex / rgb); uses current foreground if omitted
width: Stroke width in pixels (default 2.0)
tool: "pencil" (default, hard edge) or "paintbrush" (soft edge)
layer_name: Target layer; defaults to active layer
image_index: Target image index (default 0)
Returns status dict.
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": {
"x1": "<x1>",
"y1": "<y1>",
"x2": "<x2>",
"y2": "<y2>"
},
"name": "draw_line"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x1 | Yes | ||
| x2 | Yes | ||
| y1 | Yes | ||
| y2 | Yes | ||
| tool | No | pencil | |
| color | No | ||
| width | No | ||
| layer_name | No | ||
| image_index | No |