From: fred Date: Tue, 26 Mar 2002 23:23:49 +0000 (+0000) Subject: lilypond-1.3.65 X-Git-Tag: release/1.5.59~1532 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=e9eee5e9bb0c3de61ca74a6bd4ac54f7cefa59a1;p=lilypond.git lilypond-1.3.65 --- diff --git a/lily/volta-spanner.cc b/lily/volta-spanner.cc index cb9400bbca..bf7eb05c05 100644 --- a/lily/volta-spanner.cc +++ b/lily/volta-spanner.cc @@ -27,7 +27,7 @@ Volta_spanner::Volta_spanner (SCM s) { set_elt_pointer ("bars", SCM_EOL); Side_position_interface (this).set_axis (Y_AXIS); - directional_element (this).set (UP); + Directional_element_interface (this).set (UP); } @@ -46,13 +46,12 @@ GLUE_SCORE_ELEMENT(Volta_spanner,brew_molecule); SCM Volta_spanner::member_brew_molecule () const { - Molecule mol; - + Link_array bar_arr = Pointer_group_interface__extract_elements (this, (Bar*)0, "bars"); if (!bar_arr.size ()) - return mol.create_scheme(); + return SCM_EOL; bool no_vertical_start = false; bool no_vertical_end = to_boolean (get_elt_property ("last-volta")); @@ -70,10 +69,8 @@ Volta_spanner::member_brew_molecule () const Real staff_space = paper_l ()->get_var ("interline"); Real half_space = staff_space / 2; - - Real w = spanner_length () - - get_broken_left_end_align () - - half_space; + Real left = get_broken_left_end_align (); + Real w = spanner_length () - left - half_space; Real h = paper_l()->get_var ("volta_spanner_height"); Real t = paper_l ()->get_var ("volta_thick"); @@ -86,21 +83,21 @@ Volta_spanner::member_brew_molecule () const SCM_UNDEFINED)); Box b (Interval (0, w), Interval (0, h)); - Molecule volta (b, at); - mol.add_molecule (volta); - + Molecule mol (b, at); Molecule num (lookup_l ()->text ("volta", ly_scm2string (get_elt_property("text")), paper_l ())); mol.add_at_edge (X_AXIS, LEFT, num, - num.extent (X_AXIS).length () - staff_space); + mol.translate_axis (left, X_AXIS); return mol.create_scheme(); } void Volta_spanner::do_add_processing () { +#if 0 Link_array bar_arr = Pointer_group_interface__extract_elements (this, (Bar*)0, "bars"); @@ -109,6 +106,7 @@ Volta_spanner::do_add_processing () set_bound (LEFT, bar_arr[0]); set_bound (RIGHT, bar_arr.top ()); } +#endif } GLUE_SCORE_ELEMENT(Volta_spanner,after_line_breaking); @@ -127,6 +125,8 @@ Volta_spanner::add_bar (Bar* b) Side_position_interface (this).add_support (b); add_dependency (b); + + add_bound_item (this, b); } void