9#ifndef KIS_LEVELS_CURVE_H
10#define KIS_LEVELS_CURVE_H
15#include "kritaimage_export.h"
46 KisLevelsCurve(qreal inputBlackPoint, qreal inputWhitePoint, qreal inputGamma,
47 qreal outputBlackPoint, qreal outputWhitePoint);
61 qreal
value(qreal x)
const;
66 qreal inputBlackPoint()
const;
70 qreal inputWhitePoint()
const;
74 qreal inputGamma()
const;
78 qreal outputBlackPoint()
const;
82 qreal outputWhitePoint()
const;
87 void setInputBlackPoint(qreal newInputBlackPoint);
91 void setInputWhitePoint(qreal newInputWhitePoint);
95 void setInputGamma(qreal newInputGamma);
99 void setOutputBlackPoint(qreal newOutputBlackPoint);
103 void setOutputWhitePoint(qreal newOutputWhitePoint);
112 void resetInputLevels();
116 void resetOutputLevels();
121 bool isIdentity()
const;
126 const QString& name()
const;
132 void setName(
const QString &newName);
161 QString toString()
const;
166 void fromString(
const QString &text,
bool *ok =
nullptr);
float value(const T *src, size_t ch)
bool operator==(const KisRegion &lhs, const KisRegion &rhs)
This class holds the parameters for a levels adjustment. It is modeled after KisCubicCurve and has si...
static constexpr qreal defaultInputGamma()
Default value for the input gamma.
static constexpr qreal defaultOutputBlackPoint()
Default value for the output black point.
QVector< qreal > m_fTransfer
KisLevelsCurve & operator=(const KisLevelsCurve &rhs)=default
KisLevelsCurve(const KisLevelsCurve &rhs)=default
static constexpr qreal defaultOutputWhitePoint()
Default value for the output white point.
bool m_mustRecomputeFTransfer
QVector< quint16 > m_u16Transfer
bool m_mustRecomputeU16Transfer
static constexpr qreal defaultInputWhitePoint()
Default value for the input white point.
static constexpr qreal defaultInputBlackPoint()
Default value for the input black point.