]> git.donarmstrong.com Git - lilypond.git/blob - lily/tie-helper.cc
* The grand 2005-2006 replace.
[lilypond.git] / lily / tie-helper.cc
1 /*
2   tie-helper.cc -- implement Tie_configuration, Tie_details
3
4   source file of the GNU LilyPond music typesetter
5
6   (c) 2005--2006 Han-Wen Nienhuys <hanwen@xs4all.nl>
7
8 */
9
10 #include "tie.hh"
11 #include "bezier.hh"
12 #include "grob.hh"
13 #include "staff-symbol-referencer.hh"
14 #include "warn.hh"
15 #include "tie-formatting-problem.hh"
16
17 void
18 Tie_details::from_grob (Grob *me)
19 {
20   staff_symbol_referencer_ = me;
21   staff_space_ = Staff_symbol_referencer::staff_space (me);
22   SCM details = me->get_property ("details");
23
24   height_limit_ = robust_scm2double (ly_assoc_get (ly_symbol2scm ("height-limit"), details, SCM_EOL),
25                                      0.75) * staff_space_;
26   
27   ratio_ = robust_scm2double (ly_assoc_get (ly_symbol2scm ("ratio"), details, SCM_EOL),
28                               .333);
29   
30   x_gap_ = robust_scm2double (me->get_property ("x-gap"), 0.2);
31   between_length_limit_
32     = robust_scm2double (ly_assoc_get (ly_symbol2scm ("between-length-limit"), details, SCM_EOL),
33                          1.0); 
34   
35 }
36
37 Tie_details::Tie_details ()
38 {
39   staff_space_ = 1.0; 
40   height_limit_ = 1.0;
41   ratio_ = .333;   
42 }
43