File indexing completed on 2024-05-12 15:58:16

0001 /*
0002  *  SPDX-FileCopyrightText: 2008-2009 Cyrille Berger <cberger@cberger.net>
0003  *
0004  *  SPDX-License-Identifier: GPL-2.0-or-later
0005  */
0006 
0007 #ifndef _KIS_GAUSS_MASK_GENERATOR_P_H_
0008 #define _KIS_GAUSS_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 KisGaussCircleMaskGenerator::Private
0014 {
0015     Private(bool enableAntialiasing)
0016         : fadeMaker(*this, enableAntialiasing)
0017     {
0018     }
0019 
0020     Private(const Private &rhs)
0021         : ycoef(rhs.ycoef),
0022         fade(rhs.fade),
0023         center(rhs.center),
0024         distfactor(rhs.distfactor),
0025         alphafactor(rhs.alphafactor),
0026         fadeMaker(rhs.fadeMaker, *this)
0027     {
0028     }
0029 
0030     qreal ycoef {0.0};
0031     qreal fade {0.0};
0032     qreal center {0.0};
0033     qreal distfactor {0.0};
0034     qreal alphafactor {0.0};
0035     KisAntialiasingFadeMaker1D<Private> fadeMaker;
0036 
0037     QScopedPointer<KisBrushMaskApplicatorBase> applicator;
0038 
0039     inline quint8 value(qreal dist) const;
0040 
0041 };
0042 
0043 #endif /* _KIS_GAUSS_MASK_GENERATOR_P_H_ */