Paint: Straight line
paint_lineDraw a single straight line segment on a named canvas, with optional dashes, arrowheads, color/gradient, width, and hardness for rules, grids, or outlines.
Instructions
One segment, with optional dashes ([8,6]) and arrow head. hardness 0 gives an airbrush edge. For rules, grids and outlines.
Target the canvas by name (created with paint_canvas) and optionally a layer index. Layers, filters and undo work the same for every drawing tool.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x1 | Yes | ||
| x2 | Yes | ||
| y1 | Yes | ||
| y2 | Yes | ||
| cap | No | round | |
| arrow | No | none | |
| blend | No | Blend mode for this stroke | normal |
| color | Yes | Line colour or gradient | |
| layer | No | Target layer index; defaults to the active layer (see paint_canvas). | |
| width | No | ||
| canvas | Yes | Canvas name. Letters, digits, space, dot, dash, plus; the .png/.paint suffix may be included or omitted. | |
| dashes | No | ||
| opacity | No | 0..1 strength of this stroke | |
| preview | No | Image reply: auto/thumb = downscaled picture back into the result, full = unpixelated, none = text only | |
| hardness | No | ||
| arrow_size | No | ||
| dash_offset | No | ||
| preview_size | No | Longest edge of the returned thumbnail |