]> git.donarmstrong.com Git - lilypond.git/blob - lily/spacing-options.cc
* lily/spacing-determine-loose-columns.cc (is_loose_column):
[lilypond.git] / lily / spacing-options.cc
1 /*
2   spacing-options.cc -- implement Spacing_options 
3
4   source file of the GNU LilyPond music typesetter
5
6   (c) 2006 Han-Wen Nienhuys <hanwen@lilypond.org>
7
8 */
9
10 #include "spacing-spanner.hh"
11 #include "grob.hh"
12
13 void
14 Spacing_options::init_from_grob (Grob *me)
15 {
16   increment_ = robust_scm2double (me->get_property ("spacing-increment"), 1);
17
18   packed_ = to_boolean (me->get_property ("packed-spacing"));
19   stretch_uniformly_ = to_boolean (me->get_property ("uniform-stretching"));
20   float_nonmusical_columns_
21     = to_boolean (me->get_property ("strict-note-spacing"));
22   float_grace_columns_
23     = to_boolean (me->get_property ("strict-grace-spacing"));
24   shortest_duration_space_ = robust_scm2double (me->get_property ("shortest-duration-space"), 1);
25 }
26
27 Spacing_options::Spacing_options ()
28 {
29   increment_ = 1.2;
30   packed_ = false;
31   stretch_uniformly_ = false;
32   float_nonmusical_columns_ = false;
33   float_grace_columns_ = false;
34   shortest_duration_space_ = 2.0;
35
36   global_shortest_ = Rational (1, 8);
37 }