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.
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 |