Grob *n = heads[i];
int p = Staff_symbol_referencer::get_rounded_position (n);
- Direction d = LEFT;
- do
+ for (LEFT_and_RIGHT (d))
{
if (d * p > d * extpos[d])
{
extpos[d] = p;
}
}
- while (flip (&d) != DOWN);
}
return exthead;
}
{
Interval overshoot;
Direction dir = get_grob_direction (me);
- Direction d = DOWN;
- do
+ for (DOWN_and_UP (d))
overshoot[d] = d == dir ? dir * infinity_f : iv[d];
- while (flip (&d) != DOWN);
vector<Interval> heights;
vector<Grob *> my_stems;
{
Interval overshoot;
Direction dir = get_grob_direction (me);
- Direction d = DOWN;
- do
+ for (DOWN_and_UP (d))
overshoot[d] = d == dir ? dir * infinity_f : my_iv[d];
- while (flip (&d) != DOWN);
iv.intersect (overshoot);
dynamic_cast<Item *> (me)->cache_pure_height (iv);
Stem::internal_height (Grob *me, bool calc_beam)
{
Grob *beam = get_beam (me);
- if (!is_valid_stem (me) && ! beam)
+ if (!is_valid_stem (me) && !beam)
return Interval ();
Direction dir = get_grob_direction (me);
(void) beam->get_property ("quantized-positions");
}
+ /*
+ If there is a beam but no stem, slope calculations depend on this
+ routine to return where the stem end /would/ be.
+ */
+ if (calc_beam && !beam && !unsmob_stencil (me->get_property ("stencil")))
+ return Interval ();
+
Real y1 = robust_scm2double ((calc_beam
? me->get_property ("stem-begin-position")
: me->get_pure_property ("stem-begin-position", 0, INT_MAX)),