krita_set_selection
Set or modify a document selection by replacing, adding, subtracting, or intersecting with a rectangle or polygon defined in pixel coordinates.
Instructions
Replace or combine the selection with a bounded rectangle or polygon in image pixels. Rectangle requires only x/y/width/height; polygon requires only 3–256 integer points. Selection bounds must fit the canvas and 16 megapixels. No guaranteed undo transaction.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x | No | ||
| y | No | ||
| mode | No | replace | |
| shape | Yes | ||
| width | No | ||
| height | No | ||
| points | No | ||
| document_id | Yes | ||
| instance_id | Yes | ||
| operation_id | Yes |