Krita Source Code Documentation
Loading...
Searching...
No Matches
KisCurveOption.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2008 Boudewijn Rempt <boud@valdyas.org>
3 * SPDX-FileCopyrightText: 2011 Silvio Heinrich <plassy@web.de>
4 * SPDX-FileCopyrightText: 2022 Dmitry Kazakov <dimula73@gmail.com>
5 *
6 * SPDX-License-Identifier: GPL-2.0-or-later
7 */
8#ifndef KISCURVEOPTION_H
9#define KISCURVEOPTION_H
10
11#include <vector>
12#include <memory>
13
14#include <KisCurveOptionData.h>
16
17class PAINTOP_EXPORT KisCurveOption
18{
19public:
21
24
26 qreal constant {1.0};
27 qreal scaling {1.0};
28 qreal additive {0.0};
29 qreal absoluteOffset {0.0};
30 bool hasAbsoluteOffset {false};
31 bool hasScaling {false};
32 bool hasAdditive {false};
33 qreal minSizeLikeValue {0.0};
34 qreal maxSizeLikeValue {0.0};
35
41 qreal rotationLikeValue(qreal normalizedBaseAngle, bool absoluteAxesFlipped, qreal scalingPartCoeff, bool disableScalingPart) const;
42
43 qreal sizeLikeValue() const;
44 };
45
53 ValueComponents computeValueComponents(const KisPaintInformation& info, bool useStrengthValue) const;
54
55 qreal computeSizeLikeValue(const KisPaintInformation &info, bool useStrengthValue = true) const;
56 qreal computeRotationLikeValue(const KisPaintInformation& info, qreal baseValue, bool absoluteAxesFlipped, qreal scalingPartCoeff, bool disableScalingPart) const;
57
58 qreal strengthValue() const;
59 qreal strengthMinValue() const;
60 qreal strengthMaxValue() const;
61
62 bool isChecked() const;
63 bool isRandom() const;
64
65private:
72 std::vector<std::unique_ptr<KisDynamicSensor>> m_sensors;
73};
74
75#endif // KISCURVEOPTION_H
KisCurveOption(KisCurveOption &)=delete
KisCurveOption & operator=(KisCurveOption &)=delete
std::vector< std::unique_ptr< KisDynamicSensor > > m_sensors