Skip to content

armgit / krita

Public Imported from GitHub
0

Krita is a free and open source cross-platform application that offers an end-to-end solution for creating digital art files from scratch built on the KDE and Qt frameworks.

C++
1.1 KB
Raw Blame
/*
 *  SPDX-FileCopyrightText: 2010 Lukáš Tvrdý <[email protected]>
 *  SPDX-FileCopyrightText: 2011 Geoffry Song <[email protected]>
 *
 *  SPDX-License-Identifier: GPL-2.0-or-later
 */

#ifndef KIS_GAUSS_RECT_MASK_GENERATOR_P_H
#define KIS_GAUSS_RECT_MASK_GENERATOR_P_H

#include <QScopedPointer>

#include "kis_antialiasing_fade_maker.h"
#include "kis_brush_mask_applicator_base.h"

struct Q_DECL_HIDDEN KisGaussRectangleMaskGenerator::Private
{
    Private(bool enableAntialiasing)
        : fadeMaker(*this, enableAntialiasing)
    {
    }

    Private(const Private &rhs)
        : xfade(rhs.xfade),
        yfade(rhs.yfade),
        halfWidth(rhs.halfWidth),
        halfHeight(rhs.halfHeight),
        alphafactor(rhs.alphafactor),
        fadeMaker(rhs.fadeMaker, *this)
    {
    }

    qreal xfade {0.0};
    qreal yfade {0.0};
    qreal halfWidth {0.0};
    qreal halfHeight {0.0};
    qreal alphafactor {0.0};

    KisAntialiasingFadeMaker2D <Private> fadeMaker;

    QScopedPointer<KisBrushMaskApplicatorBase> applicator;

    inline quint8 value(qreal x, qreal y) const;

};

#endif // KIS_GAUSS_RECT_MASK_GENERATOR_P_H