]> git.donarmstrong.com Git - lilypond.git/commitdiff
Add full-length-to-extent property for bug #573. release/2.11.55-1
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Mon, 4 Aug 2008 02:32:21 +0000 (23:32 -0300)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Mon, 4 Aug 2008 02:32:21 +0000 (23:32 -0300)
input/regression/tuplet-full-length-extent.ly [new file with mode: 0644]
lily/tuplet-bracket.cc
scm/define-grob-properties.scm
scm/define-grobs.scm

diff --git a/input/regression/tuplet-full-length-extent.ly b/input/regression/tuplet-full-length-extent.ly
new file mode 100644 (file)
index 0000000..e2b1575
--- /dev/null
@@ -0,0 +1,20 @@
+\header {
+  
+  texidoc = "With @code{full-length-to-extent}, the extent of the
+  attaching column for a full-length tuplet bracket can be ignored."
+
+}
+\version "2.11.55"
+
+\new Staff {
+   \set tupletFullLength = ##t
+   
+   \time 1/8
+   \times 2/3 { c'16 c'16 c'16 }
+   \times 2/3 { c'16 c'16 c'16 }
+   \override TupletBracket #'full-length-to-extent = ##f
+   \times 2/3 { c'16 c'16 c'16 }
+   \override Score.RehearsalMark #'break-visibility = ##(#t #t #t)
+   \override Score.RehearsalMark #'direction = #down
+   \mark "xxxxxxxxxxxxxxxxxxxxxxx"
+}
index f6dea51ba32d241cbd7fb2fa372500530340b803..639472399c3737bf4c52a9f372bff87856eef92c 100644 (file)
@@ -238,7 +238,13 @@ Tuplet_bracket::calc_control_points (SCM smob)
          if (bounds[d]->break_status_dir ())
            padding = 0.0;
 
-         x_span[d] = bounds[d]->relative_coordinate(commonx, X_AXIS) - 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);
@@ -780,6 +786,7 @@ ADD_INTERFACE (Tuplet_bracket,
               "edge-height "
               "edge-text "
               "full-length-padding "
+              "full-length-to-extent "
               "gap "
               "positions "
               "note-columns "
index aef125d32cf531de4eafc41fc732ffd26c08b79c..b48cbc25fc95444db3acdeede64daa92b55f6c8e 100644 (file)
@@ -290,11 +290,13 @@ open string indicators.  Default value 0.5.
 @item
 @code{xo-padding} -- Padding for open and mute indicators from top fret.  Default
 value 0.25.
-@end itemize")
+@end itemize")      ;"
 
 
     ;; ugh: double, change.
      (full-length-padding ,number? "How much padding to use at the right side of a full-length tuplet bracket.")
+     (full-length-to-extent ,boolean? "Run to the extent of the column for a full-length tuplet bracket.")
+     
      (full-size-change ,boolean? "Don't make a change clef smaller.")
 
      (gap ,ly:dimension? "Size of a gap in a variable symbol.")
index ab6b270f2437edcd8c384f14b0d205e992dcce2a..6e90c4340373f04a5c5ef88942ddde0a0a1698e2 100644 (file)
        (edge-height . (0.7 . 0.7))
        (shorten-pair . (-0.2 . -0.2))
        (staff-padding . 0.25)
+       (full-length-to-extent . #t)
        (direction  . ,ly:tuplet-bracket::calc-direction)
        (positions . ,ly:tuplet-bracket::calc-positions)
        (connect-to-neighbor . ,ly:tuplet-bracket::calc-connect-to-neighbors)