File indexing completed on 2024-05-12 15:58:16
0001 /* 0002 * SPDX-FileCopyrightText: 2010 Lukáš Tvrdý <lukast.dev@gmail.com> 0003 * SPDX-FileCopyrightText: 2011 Geoffry Song <goffrie@gmail.com> 0004 * 0005 * SPDX-License-Identifier: GPL-2.0-or-later 0006 */ 0007 0008 #ifndef KIS_GAUSS_RECT_MASK_GENERATOR_P_H 0009 #define KIS_GAUSS_RECT_MASK_GENERATOR_P_H 0010 0011 #include <QScopedPointer> 0012 0013 #include "kis_antialiasing_fade_maker.h" 0014 #include "kis_brush_mask_applicator_base.h" 0015 0016 struct Q_DECL_HIDDEN KisGaussRectangleMaskGenerator::Private 0017 { 0018 Private(bool enableAntialiasing) 0019 : fadeMaker(*this, enableAntialiasing) 0020 { 0021 } 0022 0023 Private(const Private &rhs) 0024 : xfade(rhs.xfade), 0025 yfade(rhs.yfade), 0026 halfWidth(rhs.halfWidth), 0027 halfHeight(rhs.halfHeight), 0028 alphafactor(rhs.alphafactor), 0029 fadeMaker(rhs.fadeMaker, *this) 0030 { 0031 } 0032 0033 qreal xfade {0.0}; 0034 qreal yfade {0.0}; 0035 qreal halfWidth, halfHeight; 0036 qreal alphafactor {0.0}; 0037 0038 KisAntialiasingFadeMaker2D <Private> fadeMaker; 0039 0040 QScopedPointer<KisBrushMaskApplicatorBase> applicator; 0041 0042 inline quint8 value(qreal x, qreal y) const; 0043 0044 }; 0045 0046 #endif // KIS_GAUSS_RECT_MASK_GENERATOR_P_H