- Paper_line pl (Offset (x.length (), y.length ()), stencils);
- return pl.smobbed_copy ();
+ Stencil sys_stencil (Box (x, y),
+ scm_cons (ly_symbol2scm ("combine-stencil"),
+ exprs));
+
+ Grob *left_bound = this->get_bound (LEFT);
+ SCM prop_init = left_bound->get_property ("line-break-system-details");
+ Prob *pl = make_paper_system (prop_init);
+ paper_system_set_stencil (pl, sys_stencil);
+ pl->set_property ("penalty",
+ left_bound->get_property ("page-penalty"));
+
+ if (!scm_is_pair (pl->get_property ("refpoint-Y-extent")))
+ {
+ Interval staff_refpoints;
+ staff_refpoints.set_empty ();
+ extract_grob_set (this, "spaceable-staves", staves);
+ for (vsize i = staves.size (); i--;)
+ {
+ Grob *g = staves[i];
+ staff_refpoints.add_point (g->relative_coordinate (this, Y_AXIS));
+ }
+ pl->set_property ("refpoint-Y-extent", ly_interval2scm (staff_refpoints));
+ }
+
+ pl->set_property ("system-grob", this->self_scm ());
+
+ return pl->unprotect ();