]> git.donarmstrong.com Git - lilypond.git/blob - lily/spring.cc
release: 1.5.0
[lilypond.git] / lily / spring.cc
1 /*   
2   spring.cc --  implement Spring
3   
4   source file of the GNU LilyPond music typesetter
5   
6   (c) 1999--2001 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7   
8  */
9
10 #include "spring.hh"
11 #include "debug.hh"
12 #include "item.hh"
13 #include "spaceable-grob.hh"
14 #include "paper-column.hh"
15
16 Spring::Spring ()
17 {
18   item_l_drul_[LEFT]  =item_l_drul_[RIGHT] =0;
19   distance_f_ =0.;
20   strength_f_ =1.0;
21 }
22
23 void
24 Spring::add_to_cols ()
25 {
26   Spaceable_grob::add_spring (item_l_drul_[LEFT]->column_l (),
27                                  item_l_drul_[RIGHT]->column_l (),
28                                  distance_f_, strength_f_);
29 }
30
31
32 Column_spring::Column_spring ()
33 {
34   other_l_ = 0;
35   distance_f_ =0;
36   strength_f_ =1.0;
37 }
38
39
40