Logo Search packages:      
Sourcecode: inkscape version File versions

gdouble sp_knot_distance ( SPKnot knot,
Geom::Point const &  p,
guint  state 
)

Return distance of point to knot's position; unused.

Definition at line 560 of file knot.cpp.

References Geom::distance(), and SPKnot::pos.

{
    g_return_val_if_fail(knot != NULL, 1e18);
    g_return_val_if_fail(SP_IS_KNOT(knot), 1e18);

    gdouble distance = Geom::L2(p - knot->pos);

    g_signal_emit(knot,
                  knot_signals[DISTANCE], 0,
                  &p,
                  state,
                  &distance);

    return distance;
}


Generated by  Doxygen 1.6.0   Back to index