]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/axis-group-interface.cc
Merge branch 'lilypond/translation' of ssh://git.sv.gnu.org/srv/git/lilypond into...
[lilypond.git] / lily / axis-group-interface.cc
index 4ce0a01a65918d486bb1d7be9dca9603eb8ef9be..396a95857c38a56b306bc0a9b26eb3b35fc44220 100644 (file)
@@ -77,6 +77,15 @@ Axis_group_interface::relative_group_extent (vector<Grob*> const &elts,
 
 Interval
 Axis_group_interface::cached_pure_height (Grob *me, int start, int end)
+{
+  Interval iv = begin_of_line_pure_height (me, start);
+  iv.unite (rest_of_line_pure_height (me, start, end));
+
+  return iv;
+}
+
+Interval
+Axis_group_interface::rest_of_line_pure_height (Grob *me, int start, int end)
 {
   SCM adjacent_pure_heights = me->get_property ("adjacent-pure-heights");
 
@@ -691,6 +700,18 @@ Axis_group_interface::calc_next_staff_spacing (SCM smob)
   return me->get_property ("default-next-staff-spacing");
 }
 
+Real
+Axis_group_interface::minimum_distance (Grob *g1, Grob *g2, Axis a)
+{
+  SCM sym = ly_symbol2scm ((a == Y_AXIS) ? "vertical-skylines" : "horizontal-skylines");
+
+  Skyline_pair *s1 = Skyline_pair::unsmob (g1->get_property (sym));
+  Skyline_pair *s2 = Skyline_pair::unsmob (g2->get_property (sym));
+  if (s1 && s2)
+    return (*s1)[DOWN].distance ((*s2)[UP]);
+  return 0;
+}
+
 ADD_INTERFACE (Axis_group_interface,
               "An object that groups other layout objects.",
 
@@ -715,5 +736,6 @@ ADD_INTERFACE (Axis_group_interface,
               "pure-relevant-spanners "
               "staff-affinity "
               "staff-grouper "
+              "system-Y-offset "
               "vertical-skylines "
               );