From fcefc8c61c3e750f6dde04a698e0f6b3c290e4a4 Mon Sep 17 00:00:00 2001 From: Han-Wen Nienhuys Date: Tue, 27 Jan 2004 00:42:26 +0000 Subject: [PATCH] * lily/side-position-interface.cc (out_of_staff): move contents of out_of_staff into aligned_side. remove out_of_staff(). * lily/side-position-interface.cc: add staff-padding support to Side_position_interface::aligned_side. * lily/beam.cc: use Drul_array iso. interval, because *= operations on empty intervals are silly. --- ChangeLog | 1 + lily/beam.cc | 1 - lily/new-fingering-engraver.cc | 2 -- lily/side-position-interface.cc | 21 +++++++-------------- 4 files changed, 8 insertions(+), 17 deletions(-) diff --git a/ChangeLog b/ChangeLog index d4c2f81d9a..e1cfbc9dbb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,7 @@ * lily/side-position-interface.cc (out_of_staff): move contents of out_of_staff into aligned_side. + remove out_of_staff(). * input/regression/measure-grouping.ly: fix warning. diff --git a/lily/beam.cc b/lily/beam.cc index c6e6f1112d..05b83d41d2 100644 --- a/lily/beam.cc +++ b/lily/beam.cc @@ -19,7 +19,6 @@ TODO: Notes: - - Stems run to the Y-center of the beam. - beam_translation is the offset between Y centers of the beam. diff --git a/lily/new-fingering-engraver.cc b/lily/new-fingering-engraver.cc index 47c878daf3..c9ff303005 100644 --- a/lily/new-fingering-engraver.cc +++ b/lily/new-fingering-engraver.cc @@ -254,7 +254,6 @@ New_fingering_engraver::position_scripts () f->set_grob_property ("script-priority", gh_int2scm (finger_prio + i)); f->add_offset_callback (Side_position_interface::aligned_side_proc, Y_AXIS); - f->add_offset_callback (Side_position_interface::out_of_staff_proc, Y_AXIS); f->add_offset_callback (Self_alignment_interface::centered_on_parent_proc, X_AXIS); f->add_offset_callback (Self_alignment_interface::aligned_on_self_proc, X_AXIS); @@ -274,7 +273,6 @@ New_fingering_engraver::position_scripts () f->add_offset_callback (Self_alignment_interface::centered_on_parent_proc, X_AXIS); f->add_offset_callback (Self_alignment_interface::aligned_on_self_proc, X_AXIS); f->add_offset_callback (Side_position_interface::aligned_side_proc, Y_AXIS); - f->add_offset_callback (Side_position_interface::out_of_staff_proc, Y_AXIS); f->set_grob_property ("direction", gh_int2scm (DOWN)); typeset_grob (f); } diff --git a/lily/side-position-interface.cc b/lily/side-position-interface.cc index 42ae7dfd04..3aa8e58568 100644 --- a/lily/side-position-interface.cc +++ b/lily/side-position-interface.cc @@ -197,6 +197,11 @@ Side_position_interface::aligned_side (SCM element_smob, SCM axis) o += - iv[-d]; } + /* + Maintain a minimum distance to the staff. This is similar to side + position with padding, but it will put adjoining objects on a row if + stuff sticks out of the staff a little. + */ Grob * st = Staff_symbol_referencer::get_staff_symbol (me); if (st && a == Y_AXIS && gh_number_p (me->get_grob_property ("staff-padding"))) @@ -216,18 +221,6 @@ Side_position_interface::aligned_side (SCM element_smob, SCM axis) return gh_double2scm (o); } -/* - Maintain a minimum distance to the staff. This is similar to side - position with padding, but it will put adjoining objects on a row if - stuff sticks out of the staff a little. - */ -MAKE_SCHEME_CALLBACK (Side_position_interface,out_of_staff,2); -SCM -Side_position_interface::out_of_staff (SCM element_smob, SCM axis) -{ - return gh_double2scm (0); -} - void Side_position_interface::add_staff_support (Grob*me) { @@ -291,8 +284,8 @@ ADD_INTERFACE (Side_position_interface,"side-position-interface", "Position a victim object (this one) next to other objects (the " "support). In this case, the property @code{direction} signifies where to put the " "victim object relative to the support (left or right, up or down?)\n\n " - "The @code{out_of_staff} routine puts objects at a distance of the staff. If the property " - "@code{staff-padding} is not defined, the routine doesn't do anything." + "The routine puts objects at a distance of the staff if the property " + "@code{staff-padding} is defined. If undefined, the staff symbol is ignored." , "staff-padding side-support-elements direction-source " "direction side-relative-direction minimum-space padding"); -- 2.39.5