X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Fstaff-symbol-referencer.cc;h=cbcd007a6ac354a939d87ba88f2ab0014cad16f7;hb=f4d31f3999c542b4293d1fa2297c2b7f7dc20eb6;hp=fd7bcd2791d870ed90639298ca32bf4fec188a01;hpb=fdd5eca865a22b663ff4cadd3496f496a9b79606;p=lilypond.git diff --git a/lily/staff-symbol-referencer.cc b/lily/staff-symbol-referencer.cc index fd7bcd2791..cbcd007a6a 100644 --- a/lily/staff-symbol-referencer.cc +++ b/lily/staff-symbol-referencer.cc @@ -12,12 +12,7 @@ #include "staff-symbol.hh" #include "paper-def.hh" -bool -Staff_symbol_referencer::has_interface (Grob*e) -{ - return unsmob_grob (e->get_grob_property ("staff-symbol")) - || gh_number_p (e->get_grob_property ("staff-position")); -} + int Staff_symbol_referencer::line_count (Grob*me) @@ -141,12 +136,12 @@ Staff_symbol_referencer::set_position (Grob*me,Real p) } /* - half of the height, in staff space. - */ + Half of the height, in staff space, i.e. 2.0 for a normal staff. +*/ Real Staff_symbol_referencer::staff_radius (Grob*me) { - return (line_count (me) -1) / 2; + return (line_count (me) -1) / 2.0; } @@ -157,13 +152,9 @@ compare_position (Grob *const &a, Grob * const &b) Staff_symbol_referencer::get_position ((Grob*)b)); } - - - -#define has_interface ugly_hack ADD_INTERFACE (Staff_symbol_referencer,"staff-symbol-referencer-interface", - "Object whose Y position is meaning with reference to a staff -symbol. Objects that have this interface should include -Staff_symbol_referencer::callback in their Y-offset-callback. -", + "Object whose Y position is meaning with reference to a staff " +"symbol. Objects that have this interface should include " +"Staff_symbol_referencer::callback in their Y-offset-callback. " +, "staff-position");