Warning, file /office/calligra/libs/pigment/KoConvolutionOp.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001 /* 0002 * Copyright (c) 2005 Boudewijn Rempt <boud@valdyas.org> 0003 * Copyright (c) 2006-2007 Cyrille Berger <cberger@cberger.net> 0004 * 0005 * This library is free software; you can redistribute it and/or 0006 * modify it under the terms of the GNU Lesser General Public 0007 * License as published by the Free Software Foundation; either 0008 * version 2.1 of the License, or (at your option) any later version. 0009 * 0010 * This library is distributed in the hope that it will be useful, 0011 * but WITHOUT ANY WARRANTY; without even the implied warranty of 0012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 0013 * Lesser General Public License for more details. 0014 * 0015 * You should have received a copy of the GNU Lesser General Public License 0016 * along with this library; see the file COPYING.LIB. If not, write to 0017 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 0018 * Boston, MA 02110-1301, USA. 0019 */ 0020 #ifndef KO_CONVOLUTION_OP_H 0021 #define KO_CONVOLUTION_OP_H 0022 0023 /** 0024 * Base class of a convolution operation. A convolution operation is 0025 * defined by sum(colors[i] * kernelValues[i]) / factor + offset). The 0026 * most well known convolution is the gaussian blur. 0027 * 0028 * You access the KoConvolutionOp of a colorspace by calling 0029 * KoColorSpace::convolutionOp. 0030 */ 0031 class KoConvolutionOp 0032 { 0033 public: 0034 virtual ~KoConvolutionOp() { } 0035 /** 0036 * Convolve the colors. 0037 * 0038 * @param colors a pointer toward the source pixels 0039 * @param kernelValues the coeffient of the source pixels 0040 * @param dst the destination pixel 0041 * @param factor usually the factor is equal to the sum of kernelValues 0042 * @param offset the offset which is added to the result, useful 0043 * when the sum of kernelValues is equal to 0 0044 * @param nColors the number of pixels in the colors array 0045 * @param channelFlags determines which channels are affected in pixel order 0046 * 0047 * This function is thread-safe. 0048 * 0049 */ 0050 virtual void convolveColors(const quint8* const* colors, const qreal* kernelValues, quint8 *dst, qreal factor, qreal offset, qint32 nColors, const QBitArray & channelFlags) const = 0; 0051 }; 0052 0053 #endif