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
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
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));
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");
Stem::print (SCM smob)
{
Grob *me = unsmob_grob (smob);
+ Grob *beam = get_beam (me);
+
Stencil mol;
Direction d = get_grob_direction (me);
= 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;