- {
-
- /*
- can't look at stem-end-position, since that triggers
- beam slope computations.
- */
- Real stem_start = Stem::head_positions (stem) [d];
- Real stem_end = stem_start +
- d * robust_scm2double (stem->get_property ("length"), 7);
-
- Interval stem_posns (min (stem_start, stem_end),
- max (stem_end, stem_start));
-
- stem_posns.intersect (bar_height);
-
- ret = min (abs (stem_posns.length () / 7.0), 1.0);
- ret *= robust_scm2double (me->get_property ("stem-spacing-correction"), 1);
- }
+ {
+ Interval stem_posns = stem->pure_y_extent (stem, 0, INT_MAX);
+
+ stem_posns.intersect (bar_height);
+
+ ret = min (abs (stem_posns.length () / 7.0), 1.0);
+ ret *= robust_scm2double (me->get_property ("stem-spacing-correction"), 1);
+ }