Example #1
0
/*!
 * \brief Return the major handle for the control point with the handle closest to
 * a given point.
 * @param bezier A bezier connection
 * @param point A point
 * @return The major (middle) handle of the bezier control that has the
 * handle closest to point.
 * @bug Don't we really want the major handle that's actually closest to
 * the point?  This is used in connection with object menus and could cause
 * some unexpected selection of handles if a different segment has a control
 * point close to the major handle.
 */
Handle *
bezierconn_closest_major_handle (BezierConn *bezier, Point *point)
{
  Handle *closest = bezierconn_closest_handle(bezier, point);

  return bezier->object.handles[3*get_major_nr(get_handle_nr(bezier, closest))];
}
Example #2
0
static Handle *bezierline_closest_handle(Bezierline *bezierline, Point *point) {
    return bezierconn_closest_handle(&bezierline->bez, point);
}