]> git.donarmstrong.com Git - lilypond.git/commitdiff
* lily/stem.cc (calc_stem_end_position): calc quantized-positions
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Tue, 13 Jun 2006 12:57:03 +0000 (12:57 +0000)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Tue, 13 Jun 2006 12:57:03 +0000 (12:57 +0000)
for beamed case.

* lily/note-spacing.cc (stem_dir_correction): don't inspect
stem_end_position, but estimate instead. Backportme.

* lily/lexer.ll: set version-seen? even if version is
INVALID. Backportme.

ChangeLog
VERSION
lily/note-spacing.cc
lily/stem.cc

index b642a390cf3be2fb7cc748203a2b21838e3d86e0..e5007430529ad0beb222610b56f87205b924b927 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,7 +1,10 @@
 2006-06-13  Han-Wen Nienhuys  <hanwen@lilypond.org>
 
+       * lily/stem.cc (calc_stem_end_position): calc quantized-positions
+       for beamed case.
+
        * lily/note-spacing.cc (stem_dir_correction): don't inspect
-       stem_end_position if correct_stem_dirs isn't set. Backportme. 
+       stem_end_position, but estimate instead. Backportme.
 
        * lily/tuplet-bracket.cc (calc_positions): look at
        stem-end-position for tuplet bracket slope. Fixes sloped tuplet
diff --git a/VERSION b/VERSION
index 56bf762d10c17b943c7536e6dafd84053a4e119b..b5382f429e38422d24c2edda8b1a3af0f7443388 100644 (file)
--- a/VERSION
+++ b/VERSION
@@ -1,6 +1,6 @@
 PACKAGE_NAME=LilyPond
 MAJOR_VERSION=2
 MINOR_VERSION=9
-PATCH_LEVEL=8
+PATCH_LEVEL=9
 MY_PATCH_LEVEL=
 
index cb68f6b2df37937f56897d9d539291cb96ed31ce..619cda9b4eabcc50800a113a9841cbcb6534ce04 100644 (file)
@@ -306,13 +306,13 @@ Note_spacing::stem_dir_correction (Grob *me, Item *rcolumn,
          stems_drul[d] = stem;
          beams_drul[d] = Stem::get_beam (stem);
 
-         Direction sd = get_grob_direction (stem);
-         if (stem_dirs[d] && stem_dirs[d] != sd)
+         Direction stem_dir = get_grob_direction (stem);
+         if (stem_dirs[d] && stem_dirs[d] != stem_dir)
            {
              correct_stem_dirs = false;
              continue;
            }
-         stem_dirs[d] = sd;
+         stem_dirs[d] = stem_dir;
 
          /*
            Correction doesn't seem appropriate  when there is a large flag
@@ -326,8 +326,14 @@ Note_spacing::stem_dir_correction (Grob *me, Item *rcolumn,
          if (correct_stem_dirs
              && !hp.is_empty ())
            {
-             Real chord_start = hp[sd];
-             Real stem_end = Stem::stem_end_position (stem);
+             Real chord_start = hp[stem_dir];
+
+             /*
+               can't look at stem-end-position, since that triggers
+               beam slope computations.
+             */
+             Real stem_end = hp[stem_dir] +
+               stem_dir * robust_scm2double (stem->get_property ("length"), 7);
 
              stem_posns[d] = Interval (min (chord_start, stem_end),
                                        max (chord_start, stem_end));
index 8527a21553fe116ffd64470cf9051d3533c03720..4bfac0eb6e75200c6368743e4bea9506c720d3be 100644 (file)
@@ -260,7 +260,7 @@ Stem::calc_stem_end_position (SCM smob)
   if (!head_count (me))
     return scm_from_double (0.0);
 
-  if (Grob *beam = unsmob_grob (me->get_object ("beam")))
+  if (Grob *beam = get_beam (me))
     {
       (void) beam->get_property ("quantized-positions");
       return me->get_property ("stem-end-position");
@@ -684,6 +684,8 @@ SCM
 Stem::print (SCM smob)
 {
   Grob *me = unsmob_grob (smob);
+  Grob *beam = get_beam (me);
+    
   Stencil mol;
   Direction d = get_grob_direction (me);
 
@@ -697,7 +699,6 @@ Stem::print (SCM smob)
     = to_boolean (me->get_property ("avoid-note-head"))
     ? last_head (me)
     : first_head (me);
-  Grob *beam = get_beam (me);
 
   if (!lh && !stemlet)
     return SCM_EOL;