+ if (!chord_start_y (me)
+ || (get_direction (me) != get_default_dir (me)))
+ {
+
+
+ SCM sshorten = me->get_grob_property ("stem-shorten");
+ SCM scm_shorten = gh_pair_p (sshorten) ?
+ robust_list_ref ((duration_log (me) - 2) >? 0, sshorten): SCM_EOL;
+ Real shorten = 2* robust_scm2double (scm_shorten,0);
+
+
+ /* On boundary: shorten only half */
+ if (abs (head_positions (me)[get_direction (me)]) <= 1)
+ shorten *= 0.5;
+
+ length -= shorten;
+ }
+
+ /*
+ Tremolo stuff:
+ */
+ Grob * trem = unsmob_grob (me->get_grob_property ("tremolo-flag"));
+ if (trem && !unsmob_grob (me->get_grob_property ("beam")))
+ {
+ /*
+ Crude hack: add extra space if tremolo flag is there.
+
+ We can't do this for the beam, since we get into a loop
+ (Stem_tremolo::raw_molecule() looks at the beam.)
+
+ --hwn
+ */
+
+ Real minlen =
+ 1.0 + 2 * Stem_tremolo::raw_molecule (trem).extent (Y_AXIS).length () / ss;
+
+ if (durlog >= 3)
+ {
+ Interval flag_ext = flag (me).extent (Y_AXIS) ;
+ if (!flag_ext.is_empty ())
+ minlen += 2 * flag_ext.length () / ss ;