- Grob * a = apes[i]->grobs_[j];
- Box b;
- b[X_AXIS] = a->extent (me, X_AXIS);
- b[Y_AXIS] = a->extent (commony, Y_AXIS);
-
- ape->extents_.push (b);
-
- /*
- TODO: replace the extents of a flat by combination of two
- bboxes, so that we use the shape of the flat better.
- */
- insert_extent_into_skyline (&ape->left_skyline_, b, Y_AXIS, LEFT);
- insert_extent_into_skyline (&ape->right_skyline_ , b,Y_AXIS, RIGHT);
+ Grob *a = apes[i]->grobs_[j];
+
+ vector<Box> boxes = Accidental_interface::accurate_boxes (a, common);
+
+ ape->extents_.insert (ape->extents_.end (), boxes.begin (), boxes.end ());
+ for (vsize j = boxes.size (); j--;)
+ {
+ insert_extent_into_skyline (&ape->left_skyline_, boxes[j], Y_AXIS, LEFT);
+ insert_extent_into_skyline (&ape->right_skyline_, boxes[j], Y_AXIS, RIGHT);
+ }