mirror of https://github.com/GNOME/gimp.git
Bug 646718 - gimp_curve_set_curve: assertion `y >= 0 && y <= 1.0' failed
CLAMP(value, 0.0, 1.0) in one more place. The calculation does look correct, but we are probably running into floating point inaccuracies.
This commit is contained in:
parent
8c4d99f883
commit
5562f840b6
|
@ -888,6 +888,9 @@ gimp_curve_view_motion_notify (GtkWidget *widget,
|
|||
gdouble xpos = (gdouble) i / (gdouble) (n_samples - 1);
|
||||
gdouble ypos = (y1 + ((y2 - y1) * (xpos - x1)) / (x2 - x1));
|
||||
|
||||
xpos = CLAMP (xpos, 0.0, 1.0);
|
||||
ypos = CLAMP (ypos, 0.0, 1.0);
|
||||
|
||||
gimp_curve_set_curve (curve, xpos, 1.0 - ypos);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue