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_CIRCLE_MASK_GENERATOR_P_H
0008 #define KIS_CURVE_CIRCLE_MASK_GENERATOR_P_H
0009 
0010 #include "kis_antialiasing_fade_maker.h"
0011 #include "kis_brush_mask_applicator_base.h"
0012 
0013 struct Q_DECL_HIDDEN KisCurveCircleMaskGenerator::Private
0014 {
0015     Private(bool enableAntialiasing)
0016         : fadeMaker(*this, enableAntialiasing)
0017     {
0018     }
0019 
0020     Private(const Private &rhs)
0021         : xcoef(rhs.xcoef),
0022         ycoef(rhs.ycoef),
0023         curveResolution(rhs.curveResolution),
0024         curveData(rhs.curveData),
0025         curvePoints(rhs.curvePoints),
0026         dirty(true),
0027         fadeMaker(rhs.fadeMaker,*this)
0028     {
0029     }
0030 
0031     qreal xcoef {0.0};
0032     qreal ycoef {0.0};
0033     qreal curveResolution {0.0};
0034     QVector<qreal> curveData;
0035     QList<QPointF> curvePoints;
0036     bool dirty {false};
0037 
0038     KisAntialiasingFadeMaker1D<Private> fadeMaker;
0039     QScopedPointer<KisBrushMaskApplicatorBase> applicator;
0040 
0041     inline quint8 value(qreal dist) const;
0042 };
0043 
0044 #endif // KIS_CURVE_CIRCLE_MASK_GENERATOR_P_H