Krita Source Code Documentation
Loading...
Searching...
No Matches
kis_convolution_painter.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2005 Cyrille Berger <cberger@cberger.net>
3 *
4 * SPDX-License-Identifier: GPL-2.0-or-later
5 */
6#ifndef KIS_CONVOLUTION_PAINTER_H_
7#define KIS_CONVOLUTION_PAINTER_H_
8
9#include "kis_types.h"
10#include "kis_painter.h"
11#include "kis_image.h"
12#include "kritaimage_export.h"
13
14template<class factory> class KisConvolutionWorker;
15
16
18 BORDER_IGNORE = 0, // read the pixels outside of the application rect
19 BORDER_REPEAT = 1 // Use the border for the missing pixels
20};
21
29class KRITAIMAGE_EXPORT KisConvolutionPainter : public KisPainter
30{
31
32public:
33
37
43
44
45 KisConvolutionPainter(KisPaintDeviceSP device, EnginePreference enginePreference);
46
47 void setEnginePreference(EnginePreference value);
48
71 void applyMatrix(const KisConvolutionKernelSP kernel, const KisPaintDeviceSP src, QPoint srcPos, QPoint dstPos, QSize areaSize,
73
79 bool needsTransaction(const KisConvolutionKernelSP kernel) const;
80
81 static bool supportsFFTW();
82
83protected:
84 friend class KisConvolutionPainterTest;
85
86
87
88private:
89 template<class factory>
91 KisPainter *painter,
92 KoUpdater *progress);
93
94 bool useFFTImplementation(const KisConvolutionKernelSP kernel) const;
95
96private:
98};
99#endif //KIS_CONVOLUTION_PAINTER_H_
float value(const T *src, size_t ch)
The KisConvolutionPainter class applies a convolution kernel to a paint device.
EnginePreference m_enginePreference