for (set<Grob *>::const_iterator it (colliding_stems.begin ()); it != colliding_stems.end (); it++)
{
Grob *s = *it;
- Real x = (s->extent (common[X_AXIS], X_AXIS) - x_pos[LEFT] + x_span_).center ();
+ Real x = (robust_relative_extent (s, common[X_AXIS], X_AXIS) - x_pos[LEFT] + x_span_).center ();
Direction stem_dir = get_grob_direction (*it);
Interval y;
if (rests.size ())
{
Grob *rest = rests.back ();
- Real r = rest->extent (rest, X_AXIS).center ();
+ Real r = robust_relative_extent (rest, rest, X_AXIS).center ();
return scm_from_double (r);
}
// Check for number-on-bracket collisions
Grob *number = unsmob<Grob> (tuplets[i]->get_object ("tuplet-number"));
if (number)
- points.push_back (Offset (number->extent (commonx, X_AXIS).center () - x0,
- number->extent (commony, Y_AXIS)[dir]));
+ {
+ Interval x_ext = robust_relative_extent (number, commonx, X_AXIS);
+ Interval y_ext = robust_relative_extent (number, commony, Y_AXIS);
+ points.push_back (Offset (x_ext.center () - x0, y_ext[dir]));
+ }
}
if (to_boolean (me->get_property ("avoid-scripts"))
if (unsmob<Grob> (scripts[i]->get_object ("slur")))
continue;
- Interval script_x (scripts[i]->extent (commonx, X_AXIS));
- Interval script_y (scripts[i]->extent (commony, Y_AXIS));
+ Interval script_x
+ = robust_relative_extent (scripts[i], commonx, X_AXIS);
+ Interval script_y
+ = robust_relative_extent (scripts[i], commony, Y_AXIS);
points.push_back (Offset (script_x.center () - x0,
script_y[dir]));