if (get_property_data ("Y-extent") == SCM_EOL)
set_property ("Y-extent", Grob::stencil_height_proc);
if (get_property_data ("vertical-skylines") == SCM_EOL)
- set_property ("vertical-skylines", Grob::simple_vertical_skylines_from_stencil_proc);
+ set_property ("vertical-skylines", Grob::simple_vertical_skylines_from_extents_proc);
if (get_property_data ("horizontal-skylines") == SCM_EOL)
- set_property ("horizontal-skylines", Grob::simple_horizontal_skylines_from_stencil_proc);
+ set_property ("horizontal-skylines", Grob::simple_horizontal_skylines_from_extents_proc);
}
Grob::Grob (Grob const &s)
}
// We never want nan, so we avoid shifting infinite values.
- for (LEFT_and_RIGHT (d))
- if (!isinf (real_ext[d]))
- real_ext[d] += offset;
+ if(!isinf (offset))
+ real_ext.translate(offset);
+ else
+ this->warning(_f ("ignored infinite %s-offset",
+ a == X_AXIS ? "X" : "Y"));
return real_ext;
}
Grob::pure_height (Grob *refp, int start, int end)
{
SCM iv_scm = get_pure_property ("Y-extent", start, end);
+ // TODO: Why is this Interval (0,0)
+ // Shouldn't it just be an empty interval?
+ // 0,0 puts an arbitrary point at 0,0 which will influence spacing
Interval iv = robust_scm2interval (iv_scm, Interval (0, 0));
Real offset = pure_relative_y_coordinate (refp, start, end);
return common;
}
-Interval
-maybe_pure_robust_relative_extent (Grob *me, Grob *refp, Axis a, bool pure, int start, int end)
-{
- if (pure && a != Y_AXIS)
- programming_error ("tried to get pure X-offset");
- return (pure && a == Y_AXIS) ? pure_robust_relative_extent (me, refp, start, end)
- : robust_relative_extent (me, refp, a);
-}
-
-Interval
-pure_robust_relative_extent (Grob *me, Grob *refpoint, int start, int end)
-{
- Interval ext = me->pure_height (refpoint, start, end);
- if (ext.is_empty ())
- ext.add_point (me->pure_relative_y_coordinate (refpoint, start, end));
-
- return ext;
-}
-
Interval
robust_relative_extent (Grob *me, Grob *refpoint, Axis a)
{