Channel
#include <Channel.h>
Detailed Description
A Channel represents a single channel in a Node.
Krita does not use channels to store local selections: these are strictly the color and alpha channels.
Constructor & Destructor Documentation
◆ Channel()
|
explicit |
Definition at line 32 of file Channel.cpp.
◆ ~Channel()
|
override |
Definition at line 40 of file Channel.cpp.
Member Function Documentation
◆ bounds()
QRect Channel::bounds | ( | ) | const |
- Returns
- the exact bounds of the channel. This can be smaller than the bounds of the Node this channel is part of.
Definition at line 114 of file Channel.cpp.
◆ channelSize()
int Channel::channelSize | ( | ) | const |
- Returns
- the number of bytes this channel takes
Definition at line 109 of file Channel.cpp.
◆ name()
QString Channel::name | ( | ) | const |
- Returns
- the name of the channel
Definition at line 99 of file Channel.cpp.
◆ operator!=()
Definition at line 52 of file Channel.cpp.
◆ operator==()
bool Channel::operator== | ( | const Channel & | other | ) | const |
Definition at line 46 of file Channel.cpp.
◆ pixelData()
QByteArray Channel::pixelData | ( | const QRect & | rect | ) | const |
Read the values of the channel into the a byte array for each pixel in the rect from the Node this channel is part of, and returns it.
Note that if Krita is built with OpenEXR and the Node has the 16 bits floating point channel depth type, Krita returns 32 bits float for every channel; the libkis scripting API does not support half.
Definition at line 152 of file Channel.cpp.
◆ position()
int Channel::position | ( | ) | const |
- Returns
- the position of the first byte of the channel in the pixel
Definition at line 104 of file Channel.cpp.
◆ setPixelData()
void Channel::setPixelData | ( | QByteArray | value, |
const QRect & | rect ) |
setPixelData writes the given data to the relevant channel in the Node.
This is only possible for Nodes that have a paintDevice, so nothing will happen when trying to write to e.g. a group layer.
Note that if Krita is built with OpenEXR and the Node has the 16 bits floating point channel depth type, Krita expects to be given a 4 byte, 32 bits float for every channel; the libkis scripting API does not support half.
- Parameters
-
value a byte array with exactly enough bytes. rect the rectangle to write the bytes into
Definition at line 196 of file Channel.cpp.
◆ setVisible()
void Channel::setVisible | ( | bool | value | ) |
setvisible set the visibility of the channel to the given value.
Definition at line 76 of file Channel.cpp.
◆ visible()
bool Channel::visible | ( | ) | const |
visible checks whether this channel is visible in the node
- Returns
- the status of this channel
Definition at line 58 of file Channel.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2024 The KDE developers.
Generated on Tue Mar 26 2024 11:20:53 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.