+ mol.translate_axis (x_off, X_AXIS);
+ return mol.smobbed_copy ();
+}
+
+Stencil
+Multi_measure_rest::symbol_stencil (Grob *me, Real space)
+{
+ int measures = 0;
+ SCM m (me->get_property ("measure-count"));
+ if (scm_is_number (m))
+ {
+ measures = scm_to_int (m);
+ }
+ if (measures <= 0)
+ return Stencil ();
+
+ SCM limit = me->get_property ("expand-limit");
+ if (measures > scm_to_int (limit))
+ {
+ Real padding = 0.15;
+ Stencil s = big_rest (me, (1.0 - 2 * padding) * space);
+ s.translate_axis (padding * space, X_AXIS);
+ return s;
+ }
+
+ SCM alist_chain = Font_interface::music_font_alist_chain (me);
+
+ Real staff_space = Staff_symbol_referencer::staff_space (me);
+ Font_metric *musfont
+ = select_font (me->get_layout (), alist_chain);
+
+ SCM sml = me->get_property ("use-breve-rest");
+ if (measures == 1)
+ {
+ if (to_boolean (sml))
+ {
+ Stencil s = musfont->find_by_name (Rest::glyph_name (me, -1, "", false));
+
+ s.translate_axis ((space - s.extent (X_AXIS).length ()) / 2, X_AXIS);
+
+ return s;
+ }
+ else
+ {
+ Stencil s = musfont->find_by_name (Rest::glyph_name (me, 0, "", true));
+
+ /*
+ ugh.
+ */
+ if (Staff_symbol_referencer::get_position (me) == 0.0)
+ s.translate_axis (staff_space, Y_AXIS);
+
+ s.translate_axis ((space - s.extent (X_AXIS).length ()) / 2, X_AXIS);
+
+ return s;
+ }
+ }
+ else
+ {
+ return church_rest (me, musfont, measures, space);
+ }
+}
+
+/*
+ WIDTH can also be 0 to determine the minimum size of the object.
+*/
+Stencil
+Multi_measure_rest::big_rest (Grob *me, Real width)
+{
+ Real thick_thick = robust_scm2double (me->get_property ("thick-thickness"), 1.0);
+ Real hair_thick = robust_scm2double (me->get_property ("hair-thickness"), .1);
+
+ Real ss = Staff_symbol_referencer::staff_space (me);
+ Real slt = me->get_layout ()->get_dimension (ly_symbol2scm ("linethickness"));
+ Real y = slt * thick_thick / 2 * ss;
+ Real ythick = hair_thick * slt * ss;
+ Box b (Interval (0, 0 >? (width - 2 * ythick)), Interval (-y, y));
+
+ Real blot = width ? (.8 * (y <? ythick)) : 0.0;
+
+ Stencil m = Lookup::round_filled_box (b, blot);
+ Stencil yb = Lookup::round_filled_box (Box (Interval (-0.5, 0.5) * ythick, Interval (-ss, ss)), blot);
+
+ m.add_at_edge (X_AXIS, RIGHT, yb, 0, 0);
+ m.add_at_edge (X_AXIS, LEFT, yb, 0, 0);
+
+ m.align_to (X_AXIS, LEFT);
+
+ return m;
+}
+
+/*
+ Kirchenpause (?)
+*/
+Stencil
+Multi_measure_rest::church_rest (Grob *me, Font_metric *musfont, int measures,
+ Real space)
+{
+ SCM mols = SCM_EOL;
+
+ /* See Wanske pp. 125 */
+ int l = measures;
+ int count = 0;
+ Real symbols_width = 0.0;
+
+ SCM sml = me->get_property ("use-breve-rest");
+
+ while (l)