draw_rectangle
Draw a rectangle outline on a GIMP layer by specifying position, size, stroke color, and line width; use it to frame or highlight image regions.
Instructions
Draw a rectangle outline (stroke only) on a layer.
Parameters:
x, y: Top-left corner
width, height: Rectangle dimensions
color: Stroke color; uses current foreground if omitted
line_width: Stroke width in pixels (default 2.0)
layer_name: Target layer; defaults to active layer
image_index: Target image index (default 0)
Returns status dict.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x | Yes | ||
| y | Yes | ||
| color | No | ||
| width | Yes | ||
| height | Yes | ||
| layer_name | No | ||
| line_width | No | ||
| image_index | No |