source file of the GNU LilyPond music typesetter
- (c) 2005--2007 Han-Wen Nienhuys <hanwen@xs4all.nl>
+ (c) 2005--2008 Han-Wen Nienhuys <hanwen@xs4all.nl>
*/
#include "staff-spacing.hh"
#include "paper-column.hh"
#include "column-x-positions.hh"
#include "pointer-group-interface.hh"
+#include "spacing-interface.hh"
#include "spacing-spanner.hh"
#include "note-spacing.hh"
#include "moment.hh"
return false;
l_neighbor = l_neighbor->get_column ();
- r_neighbor = dynamic_cast<Item *> (Note_spacing::right_column (r_neighbor));
+ r_neighbor = dynamic_cast<Item *> (Spacing_interface::right_column (r_neighbor));
if (l == l_neighbor && r == r_neighbor)
return false;
for (vsize k = wishes.size (); k--;)
{
Grob *sp = wishes[k];
- if (Note_spacing::left_column (sp) != lc
- || Note_spacing::right_column (sp) != rc)
+ if (Spacing_interface::left_column (sp) != lc
+ || Spacing_interface::right_column (sp) != rc)
continue;
if (Note_spacing::has_interface (sp))
The note spacing should be taken from the musical
columns.
*/
- Real space = 0.0;
- Real fixed = 0.0;
-
Real base = note_spacing (me, lc, rc, options);
- Note_spacing::get_spacing (sp, rc, base, options->increment_,
- &space, &fixed);
+ Spring spring = Note_spacing::get_spacing (sp, rc, base, options->increment_);
- space -= options->increment_;
-
- dists[d] = max (dists[d], space);
+ dists[d] = max (dists[d], spring.min_distance ());
}
else if (Staff_spacing::has_interface (sp))
{
- Spring spring = Staff_spacing::get_spacing_params (sp);
- Real fixed = spring.distance_ - spring.inverse_compress_strength_;
+ Spring spring = Staff_spacing::get_spacing (sp, rc);
- dists[d] = max (dists[d], fixed);
+ dists[d] = max (dists[d], spring.min_distance ());
}
else
programming_error ("Subversive spacing wish");
Item *wish = dynamic_cast<Item *> (wishes[k]);
Item *lc = wish->get_column ();
- Grob *right = Note_spacing::right_column (wish);
+ Grob *right = Spacing_interface::right_column (wish);
if (!right)
continue;