- if (lfliebertjes.size() || rfliebertjes.size())
- {
-
- Real nw_f;
- if (!Stem::first_head (st))
- nw_f = 0;
- else
- {
- int t = Stem::duration_log (st);
-
- SCM proc = me->get_grob_property ("flag-width-function");
- SCM result = gh_call1 (proc, scm_int2num (t));
- nw_f = gh_scm2double (result);
- }
-
- /* Half beam should be one note-width,
- but let's make sure two half-beams never touch */
-
- Real w = xposn - last_xposn;
- w = w/2 <? nw_f;
-
- Molecule half = Lookup::beam (dydx, w, thick);
- for (int j = lfliebertjes.size(); j--;)
- {
- Molecule b (half);
- b.translate_axis (last_xposn - x0, X_AXIS);
- b.translate_axis (dydx * (last_xposn-x0) + bdy * lfliebertjes[j], Y_AXIS);
- the_beam.add_molecule (b);
- }
- for (int j = rfliebertjes.size(); j--;)
- {
- Molecule b (half);
- b.translate_axis (xposn - x0 - w , X_AXIS);
- b.translate_axis (dydx * (xposn-x0 -w) + bdy * rfliebertjes[j], Y_AXIS);
- the_beam.add_molecule (b);
- }
- }
- }