- Spanner*sp = dynamic_cast<Spanner*> (me);
- SCM eltlist = me->get_property ("note-columns");
- Grob *common[] = {common_refpoint_of_list (eltlist, me, X_AXIS),
- common_refpoint_of_list (eltlist, me, Y_AXIS)};
-
-
- common[X_AXIS] = common[X_AXIS]->common_refpoint (sp->get_bound (RIGHT), X_AXIS);
- common[X_AXIS] = common[X_AXIS]->common_refpoint (sp->get_bound (LEFT), X_AXIS);
-
- Link_array<Grob> encompasses = ly_scm2grobs (eltlist);
- Array<Offset> offsets;
-
- Offset origin (me->relative_coordinate (common[X_AXIS], X_AXIS),
- me->relative_coordinate (common[Y_AXIS], Y_AXIS));
-
- int first = 1;
- int last = encompasses.size () - 2;
-
- offsets.push (get_attachment (me, LEFT, common));
-
- /*
- left is broken edge
- */
- if (encompasses[0] != sp->get_bound (LEFT))
- {
- first--;
-
- // ?
- offsets[0][Y_AXIS] -=
- encompasses[0]->relative_coordinate (common[Y_AXIS], Y_AXIS)
- - me->relative_coordinate (common[Y_AXIS], Y_AXIS);
- }
-
- /*
- right is broken edge
- */
- if (encompasses.top () != sp->get_bound (RIGHT))
- {
- last++;
- }
-
- for (int i = first; i <= last; i++)
- {
- Offset o (encompass_offset (me, encompasses[i], common));
- offsets.push (o - origin);
- }
-
- offsets.push (Offset (sp->spanner_length (), 0) + get_attachment (me, RIGHT,common));
-
- if (encompasses[0] != sp->get_bound (LEFT))
- {
- offsets.top ()[Y_AXIS] -= encompasses.top ()->relative_coordinate (common[Y_AXIS], Y_AXIS)
- - me->relative_coordinate (common[Y_AXIS], Y_AXIS);
- }
-
- return offsets;