(c) 1997--1999 Han-Wen Nienhuys <hanwen@cs.uu.nl>
*/
+#include "dimension-cache.hh"
#include "lily-guile.hh"
#include "break-align-item.hh"
#include "dimensions.hh"
#include "paper-def.hh"
#include "paper-column.hh"
-
/*
Handle spacing for prefatory matter.
scm_set_car_x (first_pair, gh_double2scm (-dists[0]));
elems[0]->set_elt_property (minimum_space_scm_sym, first_pair);
-
-
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 stretch_distance =0.;
+
+ 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)
{
spring_len += dists.top ();
stretch_distance = spring_len;
}
-
/*
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_double2scm (stretch_distance));
+ gh_cons (gh_double2scm (-dists[0]),
+ gh_double2scm (stretch_distance)));
}