From: Han-Wen Nienhuys Date: Wed, 24 Jan 2007 02:01:24 +0000 (+0100) Subject: extra-dy support for new line-spanner. X-Git-Tag: release/2.11.14-1~47 X-Git-Url: https://git.donarmstrong.com/lilypond.git?a=commitdiff_plain;h=fc845a2122b77812f73aa03e283d7228705720e2;p=lilypond.git extra-dy support for new line-spanner. --- 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 " );