Selection represents a selection on Krita. A selection is not necessarily associated with a particular Node or Image.
Methods
Member documentation
Add the given selection's selected pixels to the current selection.
Parameters
| selection | (no description provided) |
Border the selection with the given radius.
Parameters
| xRadius | (no description provided) |
| yRadius | (no description provided) |
Make the selection's width and height smaller by the given value. This will not move the selection's top-left position.
Parameters
| value | (no description provided) |
copies the area defined by the selection from the node to the clipboard.
Parameters
| node | the node from where the pixels will be copied. |
erases the area defined by the selection from the node and puts a copy on the clipboard.
Parameters
| node | the node from which the selection will be cut. |
Feather the selection with the given radius.
Parameters
| radius | (no description provided) |
Grow the selection with the given radius.
Parameters
| xradius | (no description provided) |
| yradius | (no description provided) |
Intersect the given selection with this selection.
Parameters
| selection | (no description provided) |
Move the selection's top-left corner to the given coordinates.
Parameters
| x | (no description provided) |
| y | (no description provided) |
pastes the content of the clipboard to the given node, limited by the area of the current selection.
Parameters
| destination | the node where the pixels will be written |
| x | (no description provided) |
| y | (no description provided) |
reads the given rectangle from the Selection's mask and returns it as a byte array. The pixel data starts top-left, and is ordered row-first.
The byte array will contain one byte for every pixel, representing the selectedness. 0 is totally unselected, 255 is fully selected.
You can read outside the Selection's boundaries; those pixels will be unselected.
The byte array is a copy of the original selection data.
Parameters
| x | x position from where to start reading |
| y | y position from where to start reading |
| w | row length to read |
| h | number of rows to read |
Return
a QByteArray with the pixel data. The byte array may be empty. |
Replace the current selection's selection with the one of the given selection.
Parameters
| selection | (no description provided) |
Resize the selection to the given width and height. The top-left position will not be moved.
Parameters
| w | (no description provided) |
| h | (no description provided) |
Select the given area. The value can be between 0 and 255; 0 is
totally unselected, 255 is totally selected.
Parameters
| x | (no description provided) |
| y | (no description provided) |
| w | (no description provided) |
| h | (no description provided) |
| value | (no description provided) |
Select all pixels in the given node. The value can be between 0 and 255; 0 is
totally unselected, 255 is totally selected.
Parameters
| node | (no description provided) |
| value | (no description provided) |
writes the given bytes, of which there must be enough, into the Selection.
Parameters
| value | the byte array representing the pixels. There must be enough bytes available. Krita will take the raw pointer from the QByteArray and start reading, not stopping before (w * h) bytes are read. |
| x | the x position to start writing from |
| y | the y position to start writing from |
| w | the width of each row |
| h | the number of rows to write |
Shrink the selection with the given radius.
Parameters
| xRadius | (no description provided) |
| yRadius | (no description provided) |
| edgeLock | (no description provided) |
Subtract the given selection's selected pixels from the current selection.
Parameters
| selection | (no description provided) |
Intersect with the inverse of the given selection with this selection.
Parameters
| selection | (no description provided) |