File indexing completed on 2024-09-22 04:08:42
0001 /* 0002 * SPDX-FileCopyrightText: 2022 Agata Cacko <cacko.azh@gmail.com> 0003 * SPDX-FileCopyrightText: 2010 Lukáš Tvrdý <lukast.dev@gmail.com> 0004 * 0005 * SPDX-License-Identifier: GPL-2.0-or-later 0006 */ 0007 #ifndef KIS_SPRAY_SHAPE_DYNAMICS_OPTION_DATA_H 0008 #define KIS_SPRAY_SHAPE_DYNAMICS_OPTION_DATA_H 0009 0010 0011 #include "kis_types.h" 0012 #include <boost/operators.hpp> 0013 #include <kritapaintop_export.h> 0014 0015 class KisPropertiesConfiguration; 0016 0017 struct KisSprayShapeDynamicsOptionData : boost::equality_comparable<KisSprayShapeDynamicsOptionData> 0018 { 0019 inline friend bool operator==(const KisSprayShapeDynamicsOptionData &lhs, const KisSprayShapeDynamicsOptionData &rhs) { 0020 return lhs.enabled == rhs.enabled 0021 && lhs.randomSize == rhs.randomSize 0022 && lhs.fixedRotation == rhs.fixedRotation 0023 && lhs.randomRotation == rhs.randomRotation 0024 && lhs.followCursor == rhs.followCursor 0025 && lhs.followDrawingAngle == rhs.followDrawingAngle 0026 && lhs.fixedAngle == rhs.fixedAngle 0027 && lhs.randomRotationWeight == rhs.randomRotationWeight 0028 && lhs.followCursorWeight == rhs.followCursorWeight 0029 && lhs.followDrawingAngleWeight == rhs.followDrawingAngleWeight; 0030 } 0031 0032 bool enabled; 0033 // particle size dynamics 0034 bool randomSize; 0035 // rotation dynamics 0036 bool fixedRotation; 0037 bool randomRotation; 0038 bool followCursor; 0039 bool followDrawingAngle; 0040 quint16 fixedAngle; 0041 qreal randomRotationWeight; 0042 qreal followCursorWeight; 0043 qreal followDrawingAngleWeight; 0044 0045 bool read(const KisPropertiesConfiguration *setting); 0046 void write(KisPropertiesConfiguration *setting) const; 0047 }; 0048 0049 #endif // KIS_SPRAY_SHAPE_DYNAMICS_OPTION_DATA_H