File indexing completed on 2024-05-12 15:58:14
0001 /* 0002 * SPDX-FileCopyrightText: 2010 Lukáš Tvrdý <lukast.dev@gmail.com> 0003 * 0004 * SPDX-License-Identifier: GPL-2.0-or-later 0005 */ 0006 0007 #ifndef KIS_CURVE_RECT_MASK_GENERATOR_P_H 0008 #define KIS_CURVE_RECT_MASK_GENERATOR_P_H 0009 0010 #include <QScopedPointer> 0011 0012 #include "kis_antialiasing_fade_maker.h" 0013 #include "kis_brush_mask_applicator_base.h" 0014 0015 struct Q_DECL_HIDDEN KisCurveRectangleMaskGenerator::Private 0016 { 0017 Private(bool enableAntialiasing) 0018 : fadeMaker(*this, enableAntialiasing) 0019 { 0020 } 0021 0022 Private(const Private &rhs) 0023 : xcoeff(rhs.xcoeff), 0024 ycoeff(rhs.ycoeff), 0025 curveResolution(rhs.curveResolution), 0026 curveData(rhs.curveData), 0027 curvePoints(rhs.curvePoints), 0028 dirty(rhs.dirty), 0029 fadeMaker(rhs.fadeMaker, *this) 0030 { 0031 } 0032 0033 qreal xcoeff {0.0}; 0034 qreal ycoeff {0.0}; 0035 qreal curveResolution {0.0}; 0036 QVector<qreal> curveData; 0037 QList<QPointF> curvePoints; 0038 bool dirty {false}; 0039 0040 KisAntialiasingFadeMaker2D<Private> fadeMaker; 0041 QScopedPointer<KisBrushMaskApplicatorBase> applicator; 0042 0043 inline quint8 value(qreal xr, qreal yr) const; 0044 }; 0045 0046 #endif // KIS_CURVE_RECT_MASK_GENERATOR_P_H