|
Krita Source Code Documentation
|
#include <KoConvolutionOp.h>
Inheritance diagram for KoConvolutionOp:Public Member Functions | |
| virtual void | convolveColors (const quint8 *const *colors, const qreal *kernelValues, quint8 *dst, qreal factor, qreal offset, qint32 nColors, const QBitArray &channelFlags) const =0 |
| virtual | ~KoConvolutionOp () |
Base class of a convolution operation. A convolution operation is defined by sum(colors[i] * kernelValues[i]) / factor + offset). The most well known convolution is the gaussian blur.
You access the KoConvolutionOp of a colorspace by calling KoColorSpace::convolutionOp.
Definition at line 18 of file KoConvolutionOp.h.
|
inlinevirtual |
Definition at line 21 of file KoConvolutionOp.h.
|
pure virtual |
Convolve the colors.
| colors | a pointer toward the source pixels |
| kernelValues | the coefficient of the source pixels |
| dst | the destination pixel |
| factor | usually the factor is equal to the sum of kernelValues |
| offset | the offset which is added to the result, useful when the sum of kernelValues is equal to 0 |
| nColors | the number of pixels in the colors array |
| channelFlags | determines which channels are affected in pixel order |
This function is thread-safe.
Implemented in KoConvolutionOpImpl< _CSTrait >.