- Spanner*sp = dynamic_cast<Spanner*>(me);
- SCM eltlist = me->get_grob_property ("note-columns");
- Grob *common[] = {me->common_refpoint (eltlist, X_AXIS),
- me->common_refpoint (eltlist, 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> encompass_arr;
- while (gh_pair_p (eltlist))
- {
- encompass_arr.push (unsmob_element (gh_car (eltlist)));
- eltlist =gh_cdr (eltlist);
- }
- encompass_arr.reverse ();
-
-
- Array<Offset> offset_arr;
-
- Offset origin (me->relative_coordinate (common[X_AXIS], X_AXIS),
- me->relative_coordinate (common[Y_AXIS], Y_AXIS));
-
- int first = 1;
- int last = encompass_arr.size () - 2;
-
- offset_arr.push (get_attachment (me, LEFT, common));
-
- /*
- left is broken edge
- */
-
- if (encompass_arr[0] != sp->get_bound (LEFT))
- {
- first--;
-
- // ?
- offset_arr[0][Y_AXIS] -=
- encompass_arr[0]->relative_coordinate (common[Y_AXIS], Y_AXIS)
- - me->relative_coordinate (common[Y_AXIS], Y_AXIS);
- }
-
- /*
- right is broken edge
- */
- if (encompass_arr.top () != sp->get_bound (RIGHT))
- {
- last++;
- }
-
- for (int i = first; i <= last; i++)
- {
- Offset o (encompass_offset (me, encompass_arr[i], common));
- offset_arr.push (o - origin);
- }
-
- offset_arr.push (Offset (sp->spanner_length (), 0) + get_attachment (me, RIGHT,common));
-
- if (encompass_arr[0] != sp->get_bound (LEFT))
- {
- offset_arr.top ()[Y_AXIS] -= encompass_arr.top ()->relative_coordinate (common[Y_AXIS], Y_AXIS)
- - me->relative_coordinate (common[Y_AXIS], Y_AXIS);
- }
-
- return offset_arr;