+2006-05-19 Han-Wen Nienhuys <hanwen@lilypond.org>
+
+ * lily/beam.cc (set_stem_lengths): trigger 'beaming callback, in
+ case positions is set manually. Backportme.
+
2006-05-18 Erik Sandberg <mandolaerik@gmail.com>
* scm/ly-syntax-constructors.scm: New file. Converted a few syntax
/* Return the Y position of the stem-end, given the Y-left, Y-right
in POS for stem S. This Y position is relative to S. */
Real
-Beam::calc_stem_y (Grob *me, Grob *s, Grob ** common,
+Beam::calc_stem_y (Grob *me, Grob *stem, Grob **common,
Real xl, Real xr,
Drul_array<Real> pos, bool french)
{
Real beam_translation = get_beam_translation (me);
- Real r = s->relative_coordinate (common[X_AXIS], X_AXIS) - xl;
+ Real r = stem->relative_coordinate (common[X_AXIS], X_AXIS) - xl;
Real dy = pos[RIGHT] - pos[LEFT];
Real dx = xr - xl;
Real stem_y_beam0 = (dy && dx
* dy
: 0) + pos[LEFT];
- Direction my_dir = get_grob_direction (s);
- SCM beaming = s->get_property ("beaming");
+ Direction my_dir = get_grob_direction (stem);
+ SCM beaming = stem->get_property ("beaming");
Real stem_y = stem_y_beam0;
if (french)
}
else
{
- Slice bm = Stem::beam_multiplicity (s);
+ Slice bm = Stem::beam_multiplicity (stem);
if (!bm.is_empty ())
stem_y += bm[my_dir] * beam_translation;
}
Real id = me->relative_coordinate (common[Y_AXIS], Y_AXIS)
- - s->relative_coordinate (common[Y_AXIS], Y_AXIS);
+ - stem->relative_coordinate (common[Y_AXIS], Y_AXIS);
return stem_y + id;
}
{
Grob *me = unsmob_grob (smob);
- /* trigger callback. */
+ /* trigger callbacks. */
(void) me->get_property ("direction");
+ (void) me->get_property ("beaming");
SCM posns = me->get_property ("positions");