From fc845a2122b77812f73aa03e283d7228705720e2 Mon Sep 17 00:00:00 2001 From: Han-Wen Nienhuys Date: Wed, 24 Jan 2007 03:01:24 +0100 Subject: [PATCH] extra-dy support for new line-spanner. --- lily/new-line-spanner.cc | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/lily/new-line-spanner.cc b/lily/new-line-spanner.cc index c6d8773f5c..b0c4096d00 100644 --- a/lily/new-line-spanner.cc +++ b/lily/new-line-spanner.cc @@ -182,7 +182,10 @@ New_line_spanner::calc_bound_info (SCM smob, Direction dir) if (!scm_is_number (ly_assoc_get (ly_symbol2scm ("Y"), details, SCM_BOOL_F))) { Real y = 0.0; - + + Real extra_dy = robust_scm2double (me->get_property ("extra-dy"), + 0.0); + if (me->get_bound (dir)->break_status_dir ()) { /* @@ -210,13 +213,13 @@ New_line_spanner::calc_bound_info (SCM smob, Direction dir) } else { - Grob *commony = me->get_bound (LEFT)->common_refpoint (me->get_bound (RIGHT), Y_AXIS); + Grob *commony = me->get_bound (LEFT); commony = me->common_refpoint (commony, Y_AXIS); - - details = scm_acons (ly_symbol2scm ("Y"), - scm_from_double (me->get_bound (dir)->extent (commony, Y_AXIS).center()), - details); + y = me->get_bound (dir)->extent (commony, Y_AXIS).center(); } + + y += dir * extra_dy / 2; + details = scm_acons (ly_symbol2scm ("Y"), scm_from_double (y), details); } return details; @@ -312,7 +315,8 @@ ADD_INTERFACE (New_line_spanner, "arrow " "gap " "thickness " - "zigzag-length " - "zigzag-width " + "bound-details " + "left-bound-info " + "right-bound-info " ); -- 2.39.2