+ Real beam_translation = get_beam_translation (me);
+
+ /* for a whole note, we position relative to the notehead, so we want the
+ stencil aligned on the flag closest to the head */
+ Direction stencil_dir = whole_note ? -stemdir : stemdir;
+ Stencil mol = raw_stencil (me, slope, stencil_dir);
+
+ Interval mol_ext = mol.extent (Y_AXIS);
+ Real ss = Staff_symbol_referencer::staff_space (me);
+
+ // ugh, rather calc from Stem_tremolo_req
+ int beam_count = beam ? (Stem::beam_multiplicity (stem).length () + 1) : 0;
+
+ Real beamthickness = 0.0;
+ SCM sbt = (beam) ? beam->get_property ("thickness") : SCM_EOL;
+ if (scm_is_number (sbt))
+ beamthickness = scm_to_double (sbt) * ss;
+
+ Real end_y
+ = Stem::stem_end_position (stem) * ss / 2
+ - stemdir * max (beam_count, 1) * beam_translation;