- Real forced_fraction = 1.0 * forced_stem_count (me)
- / visible_stem_count (me);
-
- int beam_count = get_beam_count (me);
-
- SCM shorten_list = me->get_property ("beamed-stem-shorten");
- if (shorten_list == SCM_EOL)
- return;
-
- Real staff_space = Staff_symbol_referencer::staff_space (me);
-
- SCM shorten_elt
- = robust_list_ref (beam_count -1, shorten_list);
- Real shorten_f = scm_to_double (shorten_elt) * staff_space;
-
- /* your similar cute comment here */
- shorten_f *= forced_fraction;
-
- if (shorten_f)
- me->set_property ("shorten", scm_make_real (shorten_f));
-}
-
-/* Call list of y-dy-callbacks, that handle setting of
- grob-properties
-*/
-MAKE_SCHEME_CALLBACK (Beam, after_line_breaking, 1);
-SCM
-Beam::after_line_breaking (SCM smob)
-{
- Grob *me = unsmob_grob (smob);
-
- position_beam (me);
- return SCM_UNSPECIFIED;
-}
-
-void
-Beam::position_beam (Grob *me)
-{
- if (!me->is_live ())
- return;
- if (to_boolean (me->get_property ("positioning-done")))
- return;
-
- me->set_property ("positioning-done", SCM_BOOL_T);
-
- /* Copy to mutable list. */
- SCM s = ly_deep_copy (me->get_property ("positions"));
- me->set_property ("positions", s);
-
- if (scm_car (s) == SCM_BOOL_F)
- {
- // one wonders if such genericity is necessary --hwn.
- SCM callbacks = me->get_property ("position-callbacks");
- for (SCM i = callbacks; scm_is_pair (i); i = scm_cdr (i))
- scm_call_1 (scm_car (i), me->self_scm ());
- }