"SnapTo" feature enabled in the curve editor + non periodic handling of the flat curve editor.
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.
This commit is contained in:
@@ -70,12 +70,25 @@ class MyCurve : public Gtk::DrawingArea {
|
||||
std::vector<Gdk::Point> upoint;
|
||||
std::vector<Gdk::Point> lpoint;
|
||||
bool buttonPressed;
|
||||
enum SnapToType snapTo;
|
||||
/*
|
||||
* snapToElmt must be interpreted like this:
|
||||
* -100 : no element (default)
|
||||
* -3 : maximum value
|
||||
* -2 : identity value
|
||||
* -1 : minimum value
|
||||
* [0;1000[ : control point that it's snapped to
|
||||
* >=1000 : moved control point which is snapped to to the line made by it neighbors
|
||||
*/
|
||||
int snapToElmt;
|
||||
bool snapTo;
|
||||
double snapToMinDist;
|
||||
double snapToVal;
|
||||
MyCurveIdleHelper* mcih;
|
||||
enum ResizeState sized;
|
||||
|
||||
virtual std::vector<double> get_vector (int veclen) = 0;
|
||||
int getGraphMinSize() { return GRAPH_SIZE + RADIUS + 1; }
|
||||
bool snapCoordinate(double testedVal, double realVal);
|
||||
|
||||
public:
|
||||
MyCurve ();
|
||||
|
Reference in New Issue
Block a user