krita_fill_layer
Fills a paint layer with solid color, linear gradient, or flood fill; erases via destination-out, masked by the current selection.
Instructions
Raster source-over fill or destination-out erase on a simple RGBA/U8/sRGB paint layer, limited to 1 MP and masked by the current selection. Erase forbids color and uses opacity/selection coverage. Other modes require color. Linear gradient needs end_color/start/end; flood needs point and matches exact layer BGRA with four-connected neighbors. No brush simulation, tolerance, or guaranteed undo. Reuse operation_id.
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": {
"instance_id": "<instance_id>",
"operation_id": "<operation_id>",
"document_id": "<document_id>",
"node_id": "<node_id>",
"kind": "<kind>"
},
"name": "krita_fill_layer"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| end | No | ||
| kind | Yes | ||
| color | No | ||
| point | No | ||
| start | No | ||
| node_id | Yes | ||
| opacity | No | ||
| end_color | No | ||
| document_id | Yes | ||
| instance_id | Yes | ||
| operation_id | Yes |