]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/spacing-spanner.cc
doc fixes, rune pats
[lilypond.git] / lily / spacing-spanner.cc
index 2d5c5fd2c3b5293afd69e654698788f1d0009839..e69fac88a5e4917bf0597b53cbb1d26da9f1623c 100644 (file)
@@ -24,9 +24,7 @@
 #include "paper-column.hh"
 #include "spaceable-grob.hh"
 #include "break-align-interface.hh"
-
-
-
+#include "spacing-interface.hh"
 
 /*
   paper-column:
@@ -610,8 +608,18 @@ Spacing_spanner::standard_breakable_column_spacing (Grob * me, Item*l, Item*r,
                                   Real * fixed, Real * space,
                                   Moment shortest)
 {
-  *fixed = l->extent (l, X_AXIS)[RIGHT] - r->extent (r, X_AXIS)[LEFT];
-      
+  *fixed = 0.0;
+  Direction d = LEFT;
+  Drul_array<Item*> cols(l,r);
+  
+  do
+    {
+      Interval lext = cols[d]->extent (cols [d], X_AXIS);
+
+      *fixed += -d * lext[-d];
+    }
+  while (flip (&d) != LEFT);
+  
   if (l->breakable_b (l) && r->breakable_b(r))
     {
       Moment *dt = unsmob_moment (l->get_grob_property ("measure-length"));
@@ -834,3 +842,9 @@ quarter note is followed by  3 NHW, the half by 4 NHW, etc.
 ",
   "grace-space-factor spacing-increment base-shortest-duration shortest-duration-space");
 
+
+
+ADD_INTERFACE (Spacing_interface,"spacing-interface",
+  "Something to do with line breaking and spacing. Kill this one after determining line breaks.",
+  "");
+