Update from Andrew: tweaks for cross-staff chords snippet.
[lilypond.git] / lily / tie-specification.cc
blob3a7ce345cb425ec45d8fc5a326b3f6366d3e6525
1 #include "tie-formatting-problem.hh"
2 #include "grob.hh"
3 #include "tie.hh"
4 #include "libc-extension.hh"
5 #include "tie-specification.hh"
7 Tie_specification::Tie_specification ()
9 tie_grob_ = 0;
10 has_manual_position_ = false;
11 has_manual_dir_ = false;
12 has_manual_delta_y_ = false;
13 position_ = 0;
14 manual_position_ = 0;
15 manual_dir_ = CENTER;
16 note_head_drul_[LEFT] =
17 note_head_drul_[RIGHT] = 0;
18 column_ranks_[RIGHT] =
19 column_ranks_[LEFT] = 0;
23 void
24 Tie_specification::from_grob (Grob *tie)
26 tie_grob_ = tie;
27 if (scm_is_number (tie->get_property_data ("direction")))
29 manual_dir_ = to_dir (tie->get_property ("direction"));
30 has_manual_dir_ = true;
33 position_ = Tie::get_position (tie);
34 SCM pos_scm = tie->get_property ("staff-position");
35 if (scm_is_number (pos_scm))
37 has_manual_delta_y_ = (scm_inexact_p (pos_scm) == SCM_BOOL_T);
38 manual_position_ = scm_to_double (tie->get_property ("staff-position"));
39 has_manual_position_ = true;
43 int
44 Tie_specification::column_span () const
46 return column_ranks_[RIGHT] - column_ranks_[LEFT];