- Real nw_f;
-
- if (stem)
- {
- int t = Stem::duration_log (stem);
-
- SCM proc = me->get_property ("flag-width-function");
- SCM result = scm_call_1 (proc, scm_from_int (t));
- nw_f = scm_to_double (result);
- }
- else
- nw_f = break_overshoot[RIGHT] / 2;
-
- /* Half beam should be one note-width,
- but let's make sure two half-beams never touch */
- Real lw = nw_f;
- Real rw = nw_f;
- if (i > 0)
- rw = min (nw_f, ((xposn - last_xposn) / 2));
- else
- rw = xposn - me->get_bound (LEFT)->extent (xcommon, X_AXIS)[RIGHT]
- + break_overshoot[LEFT];
-
- if (stem)
- lw = min (nw_f, ((xposn - last_xposn) / 2));
- else
- lw = me->get_bound (RIGHT)->relative_coordinate (xcommon, X_AXIS)
- - last_xposn
- + break_overshoot[RIGHT];
-
- Stencil rhalf = Lookup::beam (slope, rw, thick, blot);
- Stencil lhalf = Lookup::beam (slope, lw, thick, blot);
- for (int j = lfliebertjes.size (); j--;)
- {
- Stencil b (lhalf);
- b.translate_axis (last_xposn - x0, X_AXIS);
- b.translate_axis (slope * (last_xposn - x0) + bdy * lfliebertjes[j], Y_AXIS);
- the_beam.add_stencil (b);
- }
- for (int j = rfliebertjes.size (); j--;)
- {
- Stencil b (rhalf);
- b.translate_axis (xposn - x0 - rw, X_AXIS);
- b.translate_axis (slope * (xposn - x0 - rw)
- + bdy * rfliebertjes[j], Y_AXIS);
- the_beam.add_stencil (b);
- }