Completing issue 1514: "Lab adjustements : CC curve and LC Hskin curve" + bugfix of the openIfNonlinear mechanism

This commit is contained in:
natureh
2012-08-16 13:53:17 +02:00
parent 88cf910c6d
commit 9c66911c99
32 changed files with 417 additions and 344 deletions

View File

@@ -146,11 +146,14 @@ void Vibrance::read(const ProcParams* pp, const ParamsEdited* pedited) {
saturated->setValue (pp->vibrance.saturated); // Pastels and Saturated are separate
}
skinTonesCurve->setCurve (pp->vibrance.skintonescurve);
skinTonesCurve->openIfNonlinear();
enableListener ();
}
void Vibrance::autoOpenCurve () {
skinTonesCurve->openIfNonlinear();
}
void Vibrance::write( ProcParams* pp, ParamsEdited* pedited) {
pp->vibrance.enabled = enabled->get_active ();
pp->vibrance.pastels = pastels->getIntValue();
@@ -333,20 +336,6 @@ void Vibrance::setAdjusterBehavior (bool pastelsadd, bool saturatedadd, bool pst
saturated->setAddMode (saturatedadd);
}
void Vibrance::colorForValue (double valX, double valY) {
CurveEditor* ce = curveEditorGG->getDisplayedCurve();
if (ce == skinTonesCurve) { // L = f(L)
red = double(valY);
green = double(valY);
blue = double(valY);
}
else {
printf("Error: no curve displayed!\n");
}
}
void Vibrance::trimValues (ProcParams* pp) {
pastels->trimValue (pp->vibrance.pastels);
saturated->trimValue (pp->vibrance.saturated);