2 semi-tie.cc -- implement Semi_tie
4 source file of the GNU LilyPond music typesetter
6 (c) 2005--2006 Han-Wen Nienhuys <hanwen@xs4all.nl>
10 #include "semi-tie-column.hh"
11 #include "semi-tie.hh"
12 #include "directional-element-interface.hh"
16 #include "staff-symbol-referencer.hh"
18 ADD_INTERFACE(Semi_tie,
22 "A tie which is only on one side connected to note heads. ",
32 MAKE_SCHEME_CALLBACK(Semi_tie, calc_control_points, 1)
34 Semi_tie::calc_control_points (SCM smob)
36 Grob *me = unsmob_grob (smob);
37 (void) me->get_property ("direction");
39 if (Semi_tie_column::has_interface (me->get_parent (Y_AXIS)))
41 me->get_parent (Y_AXIS)->get_property ("positioning-done");
45 programming_error ("lv tie without Semi_tie_column. Killing lv tie.");
49 return SCM_UNSPECIFIED;
53 Semi_tie::get_position (Grob *me)
55 Grob *h = unsmob_grob (me->get_object ("note-head"));
56 return (int) rint (Staff_symbol_referencer::get_position (h));
60 Semi_tie::less (Grob *const &s1,
63 return get_position (s1) < get_position (s2);