+/*
+ Kirchenpause (?)
+*/
+Stencil
+Multi_measure_rest::church_rest (Grob *me, Font_metric *musfont, int measure_count,
+ Real space)
+{
+ SCM mols = SCM_EOL;
+ int symbol_count = 0;
+ Real symbols_width = 0.0;
+ double total_duration = measure_count * pow (2.0, -calc_measure_duration_log (me, true));
+
+ while (total_duration > 0)
+ {
+ int dl = calc_closest_duration_log (me, total_duration, false, true);
+ double duration = pow (2.0, -dl);
+
+ total_duration -= duration;
+
+ Stencil r = musfont->find_by_name (Rest::glyph_name (me, dl, "", true));
+ if (dl == 0)
+ {
+ Real staff_space = Staff_symbol_referencer::staff_space (me);
+ r.translate_axis (staff_space, Y_AXIS);
+ }
+ symbols_width += r.extent (X_AXIS).length ();
+ mols = scm_cons (r.smobbed_copy (), mols);
+ symbol_count++;
+ }
+
+ /* Make outer padding this much bigger. */
+ Real outer_padding_factor = 1.5;
+ Real inner_padding = (space - symbols_width)
+ / (2 * outer_padding_factor + (symbol_count - 1));
+ if (inner_padding < 0)
+ inner_padding = 1.0;
+
+ Stencil mol;
+ for (SCM s = mols; scm_is_pair (s); s = scm_cdr (s))
+ mol.add_at_edge (X_AXIS, LEFT, *unsmob_stencil (scm_car (s)),
+ inner_padding);
+ mol.align_to (X_AXIS, LEFT);
+ mol.translate_axis (outer_padding_factor * inner_padding, X_AXIS);