- 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 ;
-
- /*
- The clash is smaller for down stems (since the tremolo is
- angled up.)
- */
- if (dir == DOWN)
- minlen -= 1.0;
- }
-
- length = length >? (minlen + 1.0);
- }
-
- Interval hp = head_positions (me);
- Real st = hp[dir] + dir * length;
-
- /*
- TODO: change name to extend-stems to staff/center/'()
- */
- bool no_extend_b = to_boolean (me->get_grob_property ("no-stem-extend"));
- if (!no_extend_b && dir * st < 0) // junkme?
- st = 0.0;
-
- /*
- Make a little room if we have a upflag and there is a dot.
- previous approach was to lengthen the stem. This is not
- good typesetting practice.
-
- */