+ // this loop ensures that parts of a note column will be in the same box
+ // pushes scripts and such over stems instead of just over heads
+ for (map<Grob *, vector<Grob *> >::iterator i = note_column_map.begin (); i != note_column_map.end (); i++)
+ {
+ Box big;
+ for (vsize j = 0; j < (*i).second.size (); j++)
+ {
+ Grob *e = (*i).second[j];
+ Box b;
+ for (Axis ax = X_AXIS; ax < NO_AXES; incr (ax))
+ b[ax] = e->maybe_pure_extent (common[ax], ax, pure, start, end);
+
+ if (b[X_AXIS].is_empty () || b[Y_AXIS].is_empty ())
+ continue;
+
+ big.unite (b);
+ }
+ if (!big[X_AXIS].is_empty () && !big[Y_AXIS].is_empty ())
+ boxes.push_back (big);
+ }
+
+ Skyline dim (boxes, other_axis (a), dir);
+ if (skyps.size ())
+ {
+ Skyline_pair merged (skyps);
+ dim.merge (merged[dir]);
+ }
+ if (!boxes.size ())
+ dim.set_minimum_height (0.0);
+ else
+ dim.set_minimum_height (min_h);
+
+ if (include_staff)
+ {
+ Interval staff_extents;
+ common[Y_AXIS] = staff_symbol->common_refpoint (common[Y_AXIS], Y_AXIS);
+ staff_extents = staff_symbol->maybe_pure_extent (common[Y_AXIS], Y_AXIS, pure, start, end);
+ dim.set_minimum_height (minmax (dir, min_h, staff_extents[dir]));
+ }
+
+ Real dist = dim.distance (my_dim, 0.1); // 0.1 m4g1c value...fix...
+ Real total_off = !isinf (dist) ? dir * dist : 0.0;
+
+ return finish_offset (me, dir, total_off, current_offset);
+}