mirror of
https://gitlab.gnome.org/GNOME/gimp
synced 2024-10-22 04:22:29 +00:00
a segment doesn't necessarily have a matching tangent. Check for this when
2005-10-02 Simon Budig <simon@gimp.org> * app/vectors/gimpbezierstroke.c: a segment doesn't necessarily have a matching tangent. Check for this when iterating over all segments of a path... * app/vectors/gimpstroke.c: fix the dispatch of _nearest_intersection_get().
This commit is contained in:
parent
e57ad0f8d0
commit
3b0594c429
|
@ -1,3 +1,12 @@
|
|||
2005-10-02 Simon Budig <simon@gimp.org>
|
||||
|
||||
* app/vectors/gimpbezierstroke.c: a segment doesn't necessarily
|
||||
have a matching tangent. Check for this when iterating over all
|
||||
segments of a path...
|
||||
|
||||
* app/vectors/gimpstroke.c: fix the dispatch of
|
||||
_nearest_intersection_get().
|
||||
|
||||
2005-10-02 Simon Budig <simon@gimp.org>
|
||||
|
||||
* app/vectors/gimpbezierstroke.c: correctly pass back the
|
||||
|
|
|
@ -881,7 +881,7 @@ gimp_bezier_stroke_nearest_tangent_get (const GimpStroke *stroke,
|
|||
precision,
|
||||
&point, &pos);
|
||||
|
||||
if (dist < min_dist || min_dist < 0)
|
||||
if (dist >= 0 && (dist < min_dist || min_dist < 0))
|
||||
{
|
||||
min_dist = dist;
|
||||
if (ret_pos)
|
||||
|
@ -920,7 +920,7 @@ gimp_bezier_stroke_nearest_tangent_get (const GimpStroke *stroke,
|
|||
precision,
|
||||
&point, &pos);
|
||||
|
||||
if (dist < min_dist || min_dist < 0)
|
||||
if (dist >= 0 && (dist < min_dist || min_dist < 0))
|
||||
{
|
||||
min_dist = dist;
|
||||
if (ret_pos)
|
||||
|
|
|
@ -469,15 +469,15 @@ gimp_stroke_nearest_intersection_get (const GimpStroke *stroke,
|
|||
g_return_val_if_fail (coords1 != NULL, FALSE);
|
||||
g_return_val_if_fail (direction != NULL, FALSE);
|
||||
|
||||
if (GIMP_STROKE_GET_CLASS (stroke)->nearest_tangent_get)
|
||||
return GIMP_STROKE_GET_CLASS (stroke)->nearest_tangent_get (stroke,
|
||||
coords1,
|
||||
direction,
|
||||
precision,
|
||||
nearest,
|
||||
ret_segment_start,
|
||||
ret_segment_end,
|
||||
ret_pos);
|
||||
if (GIMP_STROKE_GET_CLASS (stroke)->nearest_intersection_get)
|
||||
return GIMP_STROKE_GET_CLASS (stroke)->nearest_intersection_get (stroke,
|
||||
coords1,
|
||||
direction,
|
||||
precision,
|
||||
nearest,
|
||||
ret_segment_start,
|
||||
ret_segment_end,
|
||||
ret_pos);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue