Solving issue 2610: "Display curve node input/output values" + add a new tone curve mode (Luminance)

This commit is contained in:
Hombrenatureh.510
2015-05-21 00:07:22 +02:00
parent 06deac5da4
commit 7c0b8e6fe1
41 changed files with 1434 additions and 239 deletions

View File

@@ -36,6 +36,7 @@ MyCurve::MyCurve () : pipetteR(-1.f), pipetteG(-1.f), pipetteB(-1.f), pipetteVal
sized = RS_Pending;
snapToElmt = -100;
curveIsDirty = true;
edited_point = -1;
set_extension_events(Gdk::EXTENSION_EVENTS_ALL);
#if defined (__APPLE__)
@@ -114,6 +115,15 @@ bool MyCurve::snapCoordinateY(double testedVal, double realVal) {
return false;
}
float MyCurve::getVal(LUTf &curve, int x) {
if ((graphW-2) == curve.getSize()) {
return curve[x];
}
else {
return curve.getVal01(float(x)/(graphW-3));
}
}
void MyCurve::on_style_changed (const Glib::RefPtr<Gtk::Style>& style) {
setDirty(true);
queue_draw ();