Changed the direct dragging of a segment a bit, so that close to one

2003-09-04  Simon Budig  <simon@gimp.org>

	* app/vectors/gimpbezierstroke.c: Changed the direct dragging
	of a segment a bit, so that close to one endpoint only one
	handle gets moved.
This commit is contained in:
Simon Budig 2003-09-04 11:54:55 +00:00 committed by Simon Budig
parent a33f06e7e5
commit ea865689d0
2 changed files with 13 additions and 3 deletions

View File

@ -1,3 +1,9 @@
2003-09-04 Simon Budig <simon@gimp.org>
* app/vectors/gimpbezierstroke.c: Changed the direct dragging
of a segment a bit, so that close to one endpoint only one
handle gets moved.
2003-09-04 Michael Natterer <mitch@gimp.org>
* app/core/gimpimage-mask.[ch]: removed the _push_undo() and

View File

@ -447,10 +447,14 @@ gimp_bezier_stroke_point_move_relative (GimpStroke *stroke,
g_return_if_fail (segment_start != NULL);
if (position <= 0.5)
feel_good = (pow(2 * position, 3)) / 2;
if (position <= 1.0 / 6.0)
feel_good = 0;
else if (position <= 0.5)
feel_good = (pow((6 * position - 1) / 4.0, 3)) / 2;
else if (position <= 5.0 / 6.0)
feel_good = (1 - pow((6 * (1-position) - 1) / 4.0, 3)) / 2 + 0.5;
else
feel_good = (1 - pow((1-position)*2, 3)) / 2 + 0.5;
feel_good = 1;
gimp_bezier_coords_scale ((1-feel_good)/(3*position*
(1-position)*(1-position)),