]> git.donarmstrong.com Git - lilypond.git/blob - lily/staff-bar.cc
c1aba6ca96f8effbb13c929ce192dc440be28fee
[lilypond.git] / lily / staff-bar.cc
1 /*   
2   staff-bar.cc --  implement Staff_bar
3   
4   source file of the GNU LilyPond music typesetter
5   
6   (c) 1999--2000 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7   
8  */
9
10 #include "staff-bar.hh"
11 #include "staff-symbol-referencer.hh"
12
13 Real
14 Staff_bar::get_bar_size () const
15 {
16   SCM size = get_elt_property ("bar-size");
17   if (gh_number_p (size))
18     return gh_scm2double (size);
19   else
20     {
21       Staff_symbol_referencer_interface si (this);
22       return (si.line_count () -1) * si.staff_space ();
23     }
24 }
25