lilypond-1.3.145
[lilypond.git] / lily / staff-bracket.cc
blob2e1bd73419b45587245fff8484548be51642116f
1 /*
2 span-score-bar.cc -- implement Span_score_bar
4 source file of the GNU LilyPond music typesetter
6 (c) 1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7 */
9 #include "staff-bracket.hh"
10 #include "atom.hh"
11 #include "paper-def.hh"
12 #include "lookup.hh"
13 #include "main.hh"
15 Molecule
16 Staff_bracket::get_bar_sym (Real dy) const
18 Atom a = lookup_l ()->vbracket (dy);
19 a.translate_axis (- 1.33 * a.extent ().x ().length (), X_AXIS);
20 return Molecule (a);
23 Interval
24 Staff_bracket::do_width() const
26 return Interval (0,0);
30 void
31 Staff_bracket::do_post_processing ()
33 Span_score_bar::do_post_processing();
34 Interval i = Span_score_bar::do_height ();
35 // don't set bracket that spans less than one staff
36 Real staffheight_f = paper ()->staffheight_f ();
37 if (i.length () < 0.5 * staffheight_f)
39 transparent_b_ = true;
40 set_empty (true);