+ SCM width_scm = me->get_property ("width");
+ if (d == RIGHT && scm_is_number (width_scm))
+ {
+ /*
+ don't multiply by Staff_symbol_referencer::staff_space (me),
+ since that would make aligning staff symbols of different sizes to
+ one right margin hell.
+ */
+ span_points[RIGHT] = scm_to_double (width_scm);
+ }
+ else
+ {
+ Item *x = sp->get_bound (d);
+ if (x->extent (x, X_AXIS).is_empty ()
+ || (x->break_status_dir () && sp->broken_neighbor (d)))
+ span_points[d] = x->relative_coordinate (common, X_AXIS);
+ // What the default implementation of to-barline does for
+ // spanners is not really in usefully recognizable shape by
+ // now, so we just reimplement.
+ else
+ {
+ SCM where = (d == RIGHT
+ ? me->get_property ("break-align-symbols")
+ : ly_symbol2scm ("break-alignment"));
+ span_points[d] = Paper_column::break_align_width (x, where)[d];
+ }
+ }
+
+ span_points[d] -= d * t / 2;
+ }
+
+ Stencil m;
+
+ vector<Real> line_positions = Staff_symbol::line_positions (me);
+
+ Stencil line
+ = Lookup::horizontal_line (span_points
+ - me->relative_coordinate (common, X_AXIS),
+ t);
+
+ Real space = staff_space (me);
+ for (vector<Real>::const_iterator i = line_positions.begin (),
+ e = line_positions.end ();
+ i != e;
+ ++i)
+ {
+ Stencil b (line);
+ b.translate_axis (*i * 0.5 * space, Y_AXIS);
+ m.add_stencil (b);
+ }
+ return m.smobbed_copy ();
+}