]> git.donarmstrong.com Git - lilypond.git/commitdiff
(calc_stem_info): add minimum Y extent of
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Mon, 18 Apr 2005 15:28:33 +0000 (15:28 +0000)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Mon, 18 Apr 2005 15:28:33 +0000 (15:28 +0000)
stem-tremolo.  Fixes: bugs/tremolo-stem-length-beamed

ChangeLog
lily/stem.cc

index b6b2c27031d734479124fff7a8a36cec15105799..70e2175c0dcaa95610bf3a0305b730aa64f7706c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2005-04-18  Han-Wen Nienhuys  <hanwen@xs4all.nl>
 
+       * lily/stem.cc (calc_stem_info): add minimum Y extent of
+       stem-tremolo.  Fixes: bugs/tremolo-stem-length-beamed
+
        * lily/percent-repeat-engraver.cc (try_music): add measure before
        next_moment to future processing moment. Fixes:
        percent-repeat-mm-rest.ly
index 9378869c7b956d0a7964db0d9ea7b50dfb8d9dab..ef65d3400229c30d4b9dd39adacc30fc7a405526 100644 (file)
@@ -878,6 +878,13 @@ Stem::calc_stem_info (Grob *me)
     /* stem only extends to center of beam */
     - 0.5 * beam_thickness;
 
+  if (Grob *tremolo = unsmob_grob (me->get_property ("tremolo-flag")))
+    {
+      Interval y_ext = tremolo->extent (tremolo, Y_AXIS);
+      y_ext.widen (0.5);       // FIXME. Should be tunable? 
+      minimum_length = minimum_length >? y_ext.length ();
+    }
+  
   ideal_y *= my_dir;
   Real minimum_y = note_start + minimum_length;
   Real shortest_y = minimum_y * my_dir;