]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/break-align-item.cc
release: 1.1.64
[lilypond.git] / lily / break-align-item.cc
index 3e1ba4e18c1b9c80a8d506a85cee5e8d6ec2cdb3..cf7cc9a649512b5caf90cdfafe9f83ee4d1e9d85 100644 (file)
@@ -104,8 +104,12 @@ Break_align_item::do_pre_processing()
   
   Axis_align_item::do_pre_processing();
 
-  Real pre_space = elems[0]->extent (X_AXIS)[LEFT];
-  Real spring_len = elems.top ()->extent (X_AXIS)[RIGHT];
+
+  Real pre_space = elems[0]->extent (X_AXIS)[LEFT]
+    + elems[0]->relative_coordinate (column_l ()->dim_cache_[X_AXIS], X_AXIS);
+  Real spring_len = elems.top ()->extent (X_AXIS)[RIGHT]
+    + elems.top ()->relative_coordinate (column_l ()->dim_cache_[X_AXIS], X_AXIS);
+  
   Real stretch_distance =0.;
   
   if (SCM_CAR (symbol_list) == extra_space_scm_sym)
@@ -121,13 +125,16 @@ Break_align_item::do_pre_processing()
 
   /*
     Hint the spacing engine how much space to put in.
+
+
+    The pairs are in the format of an interval (ie. CAR <  CDR).
   */
   column_l ()->set_elt_property (extra_space_scm_sym,
                                 scm_cons (gh_double2scm (pre_space),
                                           gh_double2scm (spring_len)));
 
   column_l ()->set_elt_property (stretch_distance_scm_sym,
-                                gh_cons (gh_double2scm (dists[0]),
+                                gh_cons (gh_double2scm (-dists[0]),
                                          gh_double2scm (stretch_distance)));
                                 
 }