Next try (again against 1.3.86) (:-)): ######################################################################## --- staff-symbol-referencer.hh.orig Sun Jul 9 20:34:08 2000 +++ staff-symbol-referencer.hh Mon Oct 2 18:48:45 2000 @@ -33,6 +33,7 @@ static Real staff_space (Score_element*); static Score_element * staff_symbol_l (Score_element*); + static bool on_staffline (Score_element*); static int line_count (Score_element*); static Real position_f (Score_element*); static Real staff_radius (Score_element*); ######################################################################## --- staff-symbol-referencer.cc.orig Sun Jul 9 20:34:09 2000 +++ staff-symbol-referencer.cc Mon Oct 2 18:49:00 2000 @@ -39,6 +39,14 @@ return st ? Staff_symbol::line_count (st) : 0; } +bool +Staff_symbol_referencer::on_staffline (Score_element*me) +{ + int pos = (int)position_f (me); + int sz = line_count (me)-1; + return ((pos + sz) % 2) == 0; +} + Score_element* Staff_symbol_referencer::staff_symbol_l (Score_element*me) { ######################################################################## --- note-head.cc.orig Wed Sep 13 00:18:49 2000 +++ note-head.cc Mon Oct 2 18:31:54 2000 @@ -60,10 +60,10 @@ Real inter_f = Staff_symbol_referencer::staff_space (me)/2; int sz = Staff_symbol_referencer::line_count (me)-1; - Real p = Staff_symbol_referencer::position_f (me); + int p = (int)Staff_symbol_referencer::position_f (me); int streepjes_i = abs (p) < sz ? 0 - : (abs((int)p) - sz) /2; + : (abs(p) - sz) /2; SCM style = me->get_elt_property ("style"); if (!gh_symbol_p (style)) @@ -89,13 +89,15 @@ ledger.set_empty (true); - int parity = abs(int (p)) % 2; - + Real offs = (Staff_symbol_referencer::on_staffline (me)) + ? 0.0 + : -dir * inter_f; + for (int i=0; i < streepjes_i; i++) { Molecule s (ledger); - s.translate_axis (-dir * inter_f * (i*2 + parity), - Y_AXIS); + s.translate_axis (-dir * inter_f * i*2 + offs, + Y_AXIS); out.add_molecule (s); } } ######################################################################## --- dots.cc.orig Fri Sep 1 12:17:02 2000 +++ dots.cc Mon Oct 2 18:20:33 2000 @@ -26,9 +26,7 @@ if (!Directional_element_interface::get (me)) Directional_element_interface::set (me, UP); - - int pos = int (Staff_symbol_referencer::position_f (me)); - if (!(pos % 2)) + if (Staff_symbol_referencer::on_staffline (me)) return Staff_symbol_referencer::staff_space (me) / 2.0 * Directional_element_interface::get (me); } ######################################################################## --- breathing-sign.cc.orig Fri Sep 1 12:17:02 2000 +++ breathing-sign.cc Mon Oct 2 18:35:28 2000 @@ -42,7 +42,6 @@ { Score_element * me = (Score_element*)b; - Real space = Staff_symbol_referencer::staff_space (b); Direction d = Directional_element_interface::get (b); if (!d) { @@ -50,7 +49,9 @@ Directional_element_interface::set (me, d); } - return 2.0 * space * d; + Real inter_f = Staff_symbol_referencer::staff_space (me)/2; + int sz = Staff_symbol_referencer::line_count (me)-1; + return inter_f * sz * d; } void ######################################################################## _______________________________________________ Gnu-music-discuss mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/gnu-music-discuss