The 'outside-staff-padding of the object being placed on the outside is
left between it and any objects closer to the staff.
for (vsize j = 0; j < other_v_skylines.size (); j++)
{
Skyline_pair const &v_other = other_v_skylines[j];
for (vsize j = 0; j < other_v_skylines.size (); j++)
{
Skyline_pair const &v_other = other_v_skylines[j];
- Real pad = (padding + other_padding[j]);
Real horizon_pad = (horizon_padding + other_horizon_padding[j]);
Real horizon_pad = (horizon_padding + other_horizon_padding[j]);
- // We need to push elt up by at least this much to be above v_other.
- Real up = (*v_skyline)[DOWN].distance (v_other[UP], horizon_pad) + pad;
- // We need to push elt down by at least this much to be below v_other.
- Real down = (*v_skyline)[UP].distance (v_other[DOWN], horizon_pad) + pad;
+ Interval collision;
+ // We need to push elt by at least this much to be outside v_other.
+ collision[dir] = ((*v_skyline)[-dir].distance (v_other[dir], horizon_pad)
+ + padding) * dir;
+ // We need to pull elt by at least this much to be inside v_other.
+ collision[-dir] = ((*v_skyline)[dir].distance (v_other[-dir], horizon_pad)
+ + other_padding[j]) * -dir;
- forbidden_intervals.push_back (Interval (-down, up));
+ forbidden_intervals.push_back (collision);
}
Interval_set allowed_shifts
}
Interval_set allowed_shifts
{
Grob *elt = elements[i];
Real padding
{
Grob *elt = elements[i];
Real padding
- = robust_scm2double (elt->get_property ("outside-staff-padding"), 0.25);
+ = robust_scm2double (elt->get_property ("outside-staff-padding"),
+ Axis_group_interface::get_default_outside_staff_padding ());
Real horizon_padding
= robust_scm2double (elt->get_property ("outside-staff-horizontal-padding"), 0.0);
Interval x_extent = elt->extent (x_common, X_AXIS);
Real horizon_padding
= robust_scm2double (elt->get_property ("outside-staff-horizontal-padding"), 0.0);
Interval x_extent = elt->extent (x_common, X_AXIS);
(direction . ,DOWN)
(minimum-space . 1.2)
(outside-staff-priority . 250)
(direction . ,DOWN)
(minimum-space . 1.2)
(outside-staff-priority . 250)
- (outside-staff-padding . 0.6)
(padding . 0.6)
(side-axis . ,Y)
(slur-padding . 0.3)
(padding . 0.6)
(side-axis . ,Y)
(slur-padding . 0.3)
(font-encoding . fetaText)
(font-size . -2)
(outside-staff-horizontal-padding . 0.5)
(font-encoding . fetaText)
(font-size . -2)
(outside-staff-horizontal-padding . 0.5)
- (outside-staff-padding . 0.5)
(outside-staff-priority . 750)
(self-alignment-X . ,CENTER)
(side-axis . ,Y)
(outside-staff-priority . 750)
(self-alignment-X . ,CENTER)
(side-axis . ,Y)