return ly_interval2scm (iv);
Real ss = Staff_symbol_referencer::staff_space (me);
+ Real rad = Staff_symbol_referencer::staff_radius (me);
if (!to_boolean (me->get_property ("cross-staff")))
{
if (!hp.is_empty ())
iv.translate (hp[dir] * ss / 2);
- }
- /* at a minimum, make the pure-height cover the staff symbol */
- Real rad = Staff_symbol_referencer::staff_radius (me);
- iv.add_point (-rad * ss);
- iv.add_point (rad * ss);
+ /* extend the stem (away from the head) to cover the staff */
+ if (dir == UP)
+ iv[UP] = max (iv[UP], rad * ss);
+ else
+ iv[DOWN] = min (iv[DOWN], -rad * ss);
+ }
+ else
+ iv = Interval (-rad * ss, rad * ss);
return ly_interval2scm (iv);
}
Real stem_end = dir ? hp[dir] + dir * length : 0;
/* TODO: change name to extend-stems to staff/center/'() */
- bool no_extend_b = to_boolean (me->get_property ("no-stem-extend"));
- if (!no_extend_b && dir * stem_end < 0)
+ bool no_extend = to_boolean (me->get_property ("no-stem-extend"));
+ if (!no_extend && dir * stem_end < 0)
stem_end = 0.0;
return scm_from_double (stem_end);
Obviously not for grace beams.
Also, not for knees. Seems to be a good thing. */
- bool no_extend_b = to_boolean (me->get_property ("no-stem-extend"));
+ bool no_extend = to_boolean (me->get_property ("no-stem-extend"));
bool is_knee = to_boolean (beam->get_property ("knee"));
- if (!no_extend_b && !is_knee)
+ if (!no_extend && !is_knee)
{
/* Highest beam of (UP) beam must never be lower than middle
staffline */