Changeset View
Changeset View
Standalone View
Standalone View
libs/image/kis_gauss_rect_mask_generator_p.h
- This file was added.
1 | /* | ||||
---|---|---|---|---|---|
2 | * Copyright (c) 2010 Lukáš Tvrdý <lukast.dev@gmail.com> | ||||
3 | * Copyright (c) 2011 Geoffry Song <goffrie@gmail.com> | ||||
4 | * | ||||
5 | * This program is free software; you can redistribute it and/or modify | ||||
6 | * it under the terms of the GNU General Public License as published by | ||||
7 | * the Free Software Foundation; either version 2 of the License, or | ||||
8 | * (at your option) any later version. | ||||
9 | * | ||||
10 | * This program is distributed in the hope that it will be useful, | ||||
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||||
13 | * GNU General Public License for more details. | ||||
14 | * | ||||
15 | * You should have received a copy of the GNU General Public License | ||||
16 | * along with this program; if not, write to the Free Software | ||||
17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | ||||
18 | */ | ||||
19 | | ||||
20 | #ifndef KIS_GAUSS_RECT_MASK_GENERATOR_P_H | ||||
21 | #define KIS_GAUSS_RECT_MASK_GENERATOR_P_H | ||||
22 | | ||||
23 | #include <QScopedPointer> | ||||
24 | | ||||
25 | #include "kis_antialiasing_fade_maker.h" | ||||
26 | #include "kis_brush_mask_applicator_base.h" | ||||
27 | | ||||
28 | struct Q_DECL_HIDDEN KisGaussRectangleMaskGenerator::Private | ||||
29 | { | ||||
30 | Private(bool enableAntialiasing) | ||||
31 | : fadeMaker(*this, enableAntialiasing) | ||||
32 | { | ||||
33 | } | ||||
34 | | ||||
35 | Private(const Private &rhs) | ||||
36 | : xfade(rhs.xfade), | ||||
37 | yfade(rhs.yfade), | ||||
38 | halfWidth(rhs.halfWidth), | ||||
39 | halfHeight(rhs.halfHeight), | ||||
40 | alphafactor(rhs.alphafactor), | ||||
41 | fadeMaker(rhs.fadeMaker, *this) | ||||
42 | { | ||||
43 | } | ||||
44 | | ||||
45 | qreal xfade, yfade; | ||||
46 | qreal halfWidth, halfHeight; | ||||
47 | qreal alphafactor; | ||||
48 | | ||||
49 | KisAntialiasingFadeMaker2D <Private> fadeMaker; | ||||
50 | | ||||
51 | QScopedPointer<KisBrushMaskApplicatorBase> applicator; | ||||
52 | | ||||
53 | inline quint8 value(qreal x, qreal y) const; | ||||
54 | | ||||
55 | }; | ||||
56 | | ||||
57 | #endif // KIS_GAUSS_RECT_MASK_GENERATOR_P_H |