X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Faxis-group-interface.cc;h=ac6f85feb8e25bb810875d47567708194d762cd3;hb=90e4d7057f3857da049dfda3d130017d4719bd6b;hp=59d1d6ba24a1f54297b1fe2f9a4505d9ca634e36;hpb=2cd2b75e0e31d89c8c891e4e746c4f300b55019f;p=lilypond.git diff --git a/lily/axis-group-interface.cc b/lily/axis-group-interface.cc index 59d1d6ba24..ac6f85feb8 100644 --- a/lily/axis-group-interface.cc +++ b/lily/axis-group-interface.cc @@ -81,7 +81,7 @@ Axis_group_interface::has_axis (Grob *me, Axis a) { SCM axes = me->get_property ("axes"); - return (SCM_BOOL_F != scm_memq (scm_from_int (a), axes)); + return scm_is_true (scm_memq (scm_from_int (a), axes)); } Interval @@ -101,7 +101,7 @@ Axis_group_interface::relative_maybe_bound_group_extent (vector const &e Grob *se = elts[i]; if (!to_boolean (se->get_property ("cross-staff"))) { - Interval dims = (bound && has_interface (se) + Interval dims = (bound && has_interface (se) ? generic_bound_extent (se, common, a) : se->extent (common, a)); if (!dims.is_empty ()) @@ -284,7 +284,7 @@ Axis_group_interface::adjacent_pure_heights (SCM smob) if (g->pure_is_visible (start, visibility_end)) { - Interval dims = g->pure_height (common, start, end); + Interval dims = g->pure_y_extent (common, start, end); if (!dims.is_empty ()) { if (rank_span[LEFT] <= start) @@ -330,7 +330,7 @@ Axis_group_interface::relative_pure_height (Grob *me, int start, int end) reasonably safe to assume that if our parent is a VerticalAlignment, we can assume additivity and cache things nicely. */ Grob *p = me->get_parent (Y_AXIS); - if (p && Align_interface::has_interface (p)) + if (has_interface (p)) return Axis_group_interface::sum_partial_pure_heights (me, start, end); Grob *common = unsmob (me->get_object ("pure-Y-common")); @@ -344,9 +344,9 @@ Axis_group_interface::relative_pure_height (Grob *me, int start, int end) if (rank_span[LEFT] <= end && rank_span[RIGHT] >= start && g->pure_is_visible (start, end) && !(to_boolean (g->get_property ("cross-staff")) - && Stem::has_interface (g))) + && has_interface (g))) { - Interval dims = g->pure_height (common, start, end); + Interval dims = g->pure_y_extent (common, start, end); if (!dims.is_empty ()) r.unite (dims); } @@ -443,7 +443,7 @@ Axis_group_interface::generic_group_extent (Grob *me, Axis a) /* trigger the callback to do skyline-spacing on the children */ if (a == Y_AXIS) for (vsize i = 0; i < elts.size (); i++) - if (!(Stem::has_interface (elts[i]) + if (!(has_interface (elts[i]) && to_boolean (elts[i]->get_property ("cross-staff")))) (void) elts[i]->get_property ("vertical-skylines"); @@ -535,7 +535,7 @@ Axis_group_interface::calc_pure_y_common (SCM smob) extract_grob_set (me, "pure-relevant-grobs", elts); Grob *common = common_refpoint_of_array (elts, me, Y_AXIS); - if (common != me && Align_interface::has_interface (common)) + if (common != me && has_interface (common)) { me->programming_error("My pure_y_common is a VerticalAlignment," " which might contain several staves."); @@ -599,7 +599,7 @@ Axis_group_interface::get_children (Grob *me, vector *found) { found->push_back (me); - if (!has_interface (me)) + if (!has_interface (me)) return; extract_grob_set (me, "elements", elements); @@ -797,7 +797,7 @@ add_grobs_of_one_priority (Grob *me, last_end[dir] = x_extent[RIGHT]; Skyline_pair *v_orig = unsmob (elt->get_property ("vertical-skylines")); - if (v_orig->is_empty ()) + if (!v_orig || v_orig->is_empty ()) continue; // Find the riders associated with this grob, and merge their @@ -946,7 +946,7 @@ Axis_group_interface::skyline_spacing (Grob *me) vector current_elts; current_elts.push_back (elements[i]); while (i + 1 < elements.size () - && scm_is_eq (elements[i + 1]->get_property ("outside-staff-priority"), priority)) + && ly_is_equal (elements[i + 1]->get_property ("outside-staff-priority"), priority)) { if (!to_boolean (elements[i + 1]->get_property ("cross-staff"))) current_elts.push_back (elements[i + 1]); @@ -1043,7 +1043,6 @@ ADD_INTERFACE (Axis_group_interface, "bound-alignment-interfaces " "default-staff-staff-spacing " "elements " - "max-stretch " "no-alignment " "nonstaff-nonstaff-spacing " "nonstaff-relatedstaff-spacing "