]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/tuplet-bracket.cc
Run `make grand-replace'.
[lilypond.git] / lily / tuplet-bracket.cc
index 5a285efcbff9ab3b9ad6fb9c2d683c860eb95d9f..4edf3f3ba639425f438d458fe7cf476a208e93eb 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c) 1997--2007 Jan Nieuwenhuizen <janneke@gnu.org>
+  (c) 1997--2008 Jan Nieuwenhuizen <janneke@gnu.org>
   Han-Wen Nienhuys <hanwen@xs4all.nl>
 */
 
@@ -231,17 +231,20 @@ Tuplet_bracket::calc_control_points (SCM smob)
          /*
            We're connecting to a column, for the last bit of a broken
            fullLength bracket.
-           
-           TODO: make padding tunable?
          */
-         Real padding = 1.0;
+         Real padding =
+           robust_scm2double(me->get_property("full-length-padding"), 1.0);
 
          if (bounds[d]->break_status_dir ())
            padding = 0.0;
-         
-         x_span[d]
-           = robust_relative_extent (bounds[d], commonx, X_AXIS) [LEFT]
-           - padding;
+
+         Real coord = bounds[d]->relative_coordinate(commonx, X_AXIS);
+         if (to_boolean (me->get_property ("full-length-to-extent")))
+           coord = robust_relative_extent(bounds[d], commonx, X_AXIS)[LEFT];
+
+         coord = max (coord, x_span[LEFT]);
+
+         x_span[d] = coord - padding;
        }
     }
   while (flip (&d) != LEFT);
@@ -282,7 +285,7 @@ Tuplet_bracket::print (SCM smob)
   
   /* Don't print a tuplet bracket and number if no control-points were calculated */
   SCM cpoints =  me->get_property ("control-points");
-  if (scm_ilength (cpoints) < 2 )
+  if (scm_ilength (cpoints) < 2)
     {
       me->suicide ();
       return SCM_EOL;
@@ -767,13 +770,11 @@ Tuplet_bracket::calc_cross_staff (SCM smob)
 }
 
 ADD_INTERFACE (Tuplet_bracket,
-              "A bracket with a number in the middle, used for tuplets. "
-              "When the bracket spans  a line break, the value of "
-              "@code{break-overshoot} determines how far it extends "
-              "beyond the staff. "
-              "At a line break, the markups in the @code{edge-text} are printed "
-              "at the edges. ",
-
+              "A bracket with a number in the middle, used for tuplets."
+              "  When the bracket spans a line break, the value of"
+              " @code{break-overshoot} determines how far it extends"
+              " beyond the staff.  At a line break, the markups in the"
+              " @code{edge-text} are printed at the edges.",
 
               /* properties */
               "bracket-flare "
@@ -784,6 +785,8 @@ ADD_INTERFACE (Tuplet_bracket,
               "direction "
               "edge-height "
               "edge-text "
+              "full-length-padding "
+              "full-length-to-extent "
               "gap "
               "positions "
               "note-columns "
@@ -792,6 +795,7 @@ ADD_INTERFACE (Tuplet_bracket,
               "shorten-pair "
               "staff-padding "
               "thickness "
-              "tuplets ");
+              "tuplets "
+              );