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