1 /*
2  * This file is part of the KDE project
3  *
4  *  Copyright (c) Michael Thaler <michael.thaler@physik.tu-muenchen.de>
5  *
6  *  This program is free software; you can redistribute it and/or modify
7  *  it under the terms of the GNU General Public License as published by
8  *  the Free Software Foundation; either version 2 of the License, or
9  *  (at your option) any later version.
10  *
11  *  This program is distributed in the hope that it will be useful,
12  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14  *  GNU General Public License for more details.
15  *
16  *  You should have received a copy of the GNU General Public License
17  *  along with this program; if not, write to the Free Software
18  *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
19 */
20 
21 #ifndef _KIS_EMBOSS_FILTER_H_
22 #define _KIS_EMBOSS_FILTER_H_
23 
24 #include "filter/kis_filter.h"
25 #include "kis_config_widget.h"
26 
27 class KisEmbossFilter : public KisFilter
28 {
29 public:
30     KisEmbossFilter();
31 public:
32 
33     void processImpl(KisPaintDeviceSP device,
34                      const QRect& applyRect,
35                      const KisFilterConfigurationSP config,
36                      KoUpdater* progressUpdater
37                      ) const override;
id()38     static inline KoID id() {
39         return KoID("emboss", i18n("Emboss with Variable Depth"));
40     }
41 
42 public:
43     KisConfigWidget * createConfigurationWidget(QWidget* parent, const KisPaintDeviceSP dev, bool useForMasks) const override;
44 protected:
45     KisFilterConfigurationSP defaultConfiguration() const override;
46 
47 private:
48     inline int Lim_Max(int Now, int Up, int Max) const;
49 };
50 
51 #endif
52