Krita Source Code Documentation
Loading...
Searching...
No Matches
KoConvolutionOp Class Referenceabstract

#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 ()
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ ~KoConvolutionOp()

virtual KoConvolutionOp::~KoConvolutionOp ( )
inlinevirtual

Definition at line 21 of file KoConvolutionOp.h.

21{ }

Member Function Documentation

◆ convolveColors()

virtual void KoConvolutionOp::convolveColors ( const quint8 *const * colors,
const qreal * kernelValues,
quint8 * dst,
qreal factor,
qreal offset,
qint32 nColors,
const QBitArray & channelFlags ) const
pure virtual

Convolve the colors.

Parameters
colorsa pointer toward the source pixels
kernelValuesthe coefficient of the source pixels
dstthe destination pixel
factorusually the factor is equal to the sum of kernelValues
offsetthe offset which is added to the result, useful when the sum of kernelValues is equal to 0
nColorsthe number of pixels in the colors array
channelFlagsdetermines which channels are affected in pixel order

This function is thread-safe.

Implemented in KoConvolutionOpImpl< _CSTrait >.


The documentation for this class was generated from the following file: