]> git.donarmstrong.com Git - lilypond.git/commitdiff
extra-dy support for new line-spanner.
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Wed, 24 Jan 2007 02:01:24 +0000 (03:01 +0100)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Wed, 24 Jan 2007 02:01:24 +0000 (03:01 +0100)
lily/new-line-spanner.cc

index c6d8773f5cdaa7ef2f1494c124def397e5bd99d8..b0c4096d00ab511bd88cbd790ed36a0655e997aa 100644 (file)
@@ -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 " 
               );