Here is the new modifiew key behaviour :
* CONTROL while dragging a point :
slow down 20x the point move (i.e. 1pixel of cursor move move the control point by 0.05px)
* SHIFT while dragging a point :
snap the point to the following elements, on a "use nearest solution" method :
o Diagonal curve editor :
+ top bound,
+ bottom bound,
+ identity (diagonal) line,
+ same Y than previous point,
+ same Y than next point,
+ line made by the previous and next point ; this will help to create linear parts in the curve more easilly
o Flat curve editor (when moving a point) :
+ top bound,
+ bottom bound,
+ identity (horizontal) line,
+ same Y than previous point (or last point if you move the first point),
+ same Y than next point (or first point if you move the last point
o Flat curve editor (when moving a tangential handle) :
+ 0.0, 0.35, 0.5, 1.0 values
0.35 is the default handles value and does create an smooth "diagonal" transition between points.
60 lines
1.8 KiB
C++
60 lines
1.8 KiB
C++
/*
|
|
* This file is part of RawTherapee.
|
|
*
|
|
* Copyright (c) 2004-2010 Gabor Horvath <hgabor@rawtherapee.com>
|
|
*
|
|
* RawTherapee is free software: you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License as published by
|
|
* the Free Software Foundation, either version 3 of the License, or
|
|
* (at your option) any later version.
|
|
*
|
|
* RawTherapee is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU General Public License
|
|
* along with RawTherapee. If not, see <http://www.gnu.org/licenses/>.
|
|
*/
|
|
#ifndef _FLATCURVEEDITORSUBGROUP_
|
|
#define _FLATCURVEEDITORSUBGROUP_
|
|
|
|
#include <gtkmm.h>
|
|
#include <curveeditorgroup.h>
|
|
|
|
class FlatCurveEditor;
|
|
|
|
class FlatCurveEditorSubGroup: public CurveEditorSubGroup {
|
|
|
|
friend class FlatCurveEditor;
|
|
|
|
protected:
|
|
Gtk::HBox* CPointsCurveBox;
|
|
|
|
MyFlatCurve* CPointsCurve;
|
|
|
|
Gtk::Button* saveCPoints;
|
|
Gtk::Button* loadCPoints;
|
|
|
|
public:
|
|
FlatCurveEditorSubGroup(CurveEditorGroup* prt);
|
|
~FlatCurveEditorSubGroup();
|
|
|
|
FlatCurveEditor* addCurve(Glib::ustring curveLabel = "", bool periodic = true);
|
|
//virtual void updateBackgroundHistogram (CurveEditor* ce);
|
|
virtual void setColorProvider (ColorProvider* p);
|
|
|
|
protected:
|
|
void storeCurveValues (CurveEditor* ce, const std::vector<double>& p);
|
|
void storeDisplayedCurve ();
|
|
void restoreDisplayedHistogram ();
|
|
void savePressed ();
|
|
void loadPressed ();
|
|
void switchGUI();
|
|
bool curveReset (int cType);
|
|
void removeEditor ();
|
|
const std::vector<double> getCurveFromGUI (int type);
|
|
};
|
|
|
|
#endif
|