Fixes Issue 1504, allowing feather beam line breaking.
[lilypond/patrick.git] / lily / slur-score-parameters.cc
blob1683aeea2feace61a84496e7247cecb57fd81e6d
1 /*
2 This file is part of LilyPond, the GNU music typesetter.
4 Copyright (C) 2006--2011 Han-Wen Nienhuys <hanwen@xs4all.nl>
7 LilyPond is free software: you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version.
12 LilyPond is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with LilyPond. If not, see <http://www.gnu.org/licenses/>.
22 #include "slur-score-parameters.hh"
23 #include "grob.hh"
26 Real
27 get_detail (SCM alist, SCM sym)
29 SCM entry = scm_assq (sym, alist);
30 return robust_scm2double (scm_is_pair (entry)
31 ? scm_cdr (entry)
32 : SCM_EOL,
33 0.0);
36 void
37 Slur_score_parameters::fill (Grob *me)
39 SCM details = me->get_property ("details");
41 region_size_
42 = (int) get_detail (details, ly_symbol2scm ("region-size"));
43 head_encompass_penalty_
44 = get_detail (details, ly_symbol2scm ("head-encompass-penalty"));
45 stem_encompass_penalty_
46 = get_detail (details, ly_symbol2scm ("stem-encompass-penalty"));
47 closeness_factor_
48 = get_detail (details, ly_symbol2scm ("closeness-factor"));
49 edge_attraction_factor_
50 = get_detail (details, ly_symbol2scm ("edge-attraction-factor"));
51 same_slope_penalty_
52 = get_detail (details, ly_symbol2scm ("same-slope-penalty"));
53 steeper_slope_factor_
54 = get_detail (details, ly_symbol2scm ("steeper-slope-factor"));
55 non_horizontal_penalty_
56 = get_detail (details, ly_symbol2scm ("non-horizontal-penalty"));
57 max_slope_
58 = get_detail (details, ly_symbol2scm ("max-slope"));
59 max_slope_factor_
60 = get_detail (details, ly_symbol2scm ("max-slope-factor"));
61 free_head_distance_
62 = get_detail (details, ly_symbol2scm ("free-head-distance"));
63 absolute_closeness_measure_
64 = get_detail (details, ly_symbol2scm ("absolute-closeness-measure"));
65 extra_object_collision_penalty_
66 = get_detail (details, ly_symbol2scm ("extra-object-collision-penalty"));
67 accidental_collision_
68 = get_detail (details, ly_symbol2scm ("accidental-collision"));
69 extra_encompass_free_distance_
70 = get_detail (details, ly_symbol2scm ("extra-encompass-free-distance"));
71 extra_encompass_collision_distance_
72 = get_detail (details, ly_symbol2scm ("extra-encompass-collision-distance"));
73 head_slur_distance_factor_
74 = get_detail (details, ly_symbol2scm ("head-slur-distance-factor"));
75 head_slur_distance_max_ratio_
76 = get_detail (details, ly_symbol2scm ("head-slur-distance-max-ratio"));
77 free_slur_distance_
78 = get_detail (details, ly_symbol2scm ("free-slur-distance"));
79 edge_slope_exponent_
80 = get_detail (details, ly_symbol2scm ("edge-slope-exponent"));