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

@@ -70,12 +70,14 @@ void RGBCurves::read (const ProcParams* pp, const ParamsEdited* pedited) {
Gshape->setCurve (pp->rgbCurves.gcurve);
Bshape->setCurve (pp->rgbCurves.bcurve);
enableListener ();
}
void RGBCurves::autoOpenCurve () {
// Open up the first curve if selected
bool active = Rshape->openIfNonlinear();
if (!active) Gshape->openIfNonlinear();
if (!active) Bshape->openIfNonlinear();
enableListener ();
}
void RGBCurves::write (ProcParams* pp, ParamsEdited* pedited) {
@@ -110,34 +112,6 @@ void RGBCurves::curveChanged (CurveEditor* ce) {
}
}
//!!! TODO: change
void RGBCurves::colorForValue (double valX, double valY) {
CurveEditor* ce = curveEditorG->getDisplayedCurve();
if (ce == Rshape) { // L = f(L)
red = (double)valY;
green = (double)valY;
blue = (double)valY;
}
else if (ce == Gshape) { // a = f(a)
// TODO: To be implemented
red = (double)valY;
green = (double)valY;
blue = (double)valY;
}
else if (ce == Bshape) { // b = f(b)
red = (double)valY;
green = (double)valY;
blue = (double)valY;
}
else {
printf("Error: no curve displayed!\n");
}
}
void RGBCurves::setBatchMode (bool batchMode) {
ToolPanel::setBatchMode (batchMode);