File indexing completed on 2024-06-09 04:28:14

0001 /*
0002  *  SPDX-FileCopyrightText: 2017 Dmitry Kazakov <dimula73@gmail.com>
0003  *
0004  *  SPDX-License-Identifier: GPL-2.0-or-later
0005  */
0006 
0007 #ifndef KISMASKINGBRUSHOPTIONPROPERTIES_H
0008 #define KISMASKINGBRUSHOPTIONPROPERTIES_H
0009 
0010 #include "kritapaintop_export.h"
0011 #include <kis_types.h>
0012 #include <KisBrushModel.h>
0013 #include <KoCompositeOpRegistry.h>
0014 
0015 class KisResourcesInterface;
0016 using KisResourcesInterfaceSP = QSharedPointer<KisResourcesInterface>;
0017 
0018 class KoCanvasResourcesInterface;
0019 using KoCanvasResourcesInterfaceSP = QSharedPointer<KoCanvasResourcesInterface>;
0020 
0021 namespace KisBrushModel {
0022 struct PAINTOP_EXPORT MaskingBrushData :  public boost::equality_comparable<MaskingBrushData>
0023 {
0024     bool isEnabled = false;
0025     BrushData brush;
0026     QString compositeOpId = COMPOSITE_MULT;
0027     bool useMasterSize = true;
0028     qreal masterSizeCoeff = 1.0;
0029 
0030     friend bool operator==(const MaskingBrushData &lhs, const MaskingBrushData &rhs);
0031     static MaskingBrushData read(const KisPropertiesConfiguration *config, qreal masterBrushSize, KisResourcesInterfaceSP resourcesInterface);
0032     void write(KisPropertiesConfiguration *config) const;
0033 };
0034 
0035 bool operator==(const MaskingBrushData &lhs, const MaskingBrushData &rhs);
0036 
0037 }
0038 
0039 #endif // KISMASKINGBRUSHOPTIONPROPERTIES_H