for (vsize j = 0; j < spanners.size (); j++)
{
Interval_t<int> rank_span = spanners[j]->spanned_rank_interval ();
- if (rank_span[LEFT] <= end && rank_span[RIGHT] >= start)
+ if (rank_span[LEFT] <= end && rank_span[RIGHT] >= start
+ && !to_boolean (spanners[j]->get_property ("cross-staff")))
{
Interval dims = spanners[j]->pure_height (common, start, end);
if (!dims.is_empty ())
DECLARE_SCHEME_CALLBACK (x_aligned_side, (SCM element, SCM current));
DECLARE_SCHEME_CALLBACK (y_aligned_side, (SCM element, SCM current));
DECLARE_SCHEME_CALLBACK (pure_y_aligned_side, (SCM element, SCM start, SCM end, SCM current));
+ DECLARE_SCHEME_CALLBACK (calc_cross_staff, (SCM element));
static SCM aligned_side (Grob*me, Axis a, bool pure, int start, int end, Real *current_off_ptr);
cur_off);
}
+MAKE_SCHEME_CALLBACK (Side_position_interface, calc_cross_staff, 1)
+SCM
+Side_position_interface::calc_cross_staff (SCM smob)
+{
+ Grob *me = unsmob_grob (smob);
+ extract_grob_set (me, "side-support-elements", elts);
+
+ Grob *common = common_refpoint_of_array (elts, me->get_parent (Y_AXIS), Y_AXIS);
+ return scm_from_bool (common != me->get_parent (Y_AXIS));
+}
+
SCM
Side_position_interface::aligned_side (Grob *me, Axis a, bool pure, int start, int end,
Real *current_off)
(outside-staff-priority . 250)
(Y-extent . ,ly:axis-group-interface::height)
(X-extent . ,ly:axis-group-interface::width)
+ (cross-staff . ,ly:side-position-interface::calc-cross-staff)
(meta . ((class . Spanner)
(interfaces . (axis-group-interface
dynamic-interface