lilypond-1.3.67
[lilypond.git] / lily / piano-brace.cc
bloba1094140a23b946b634a4ee9f8e07b897a0d7bd9
2 /*
3 span-score-bar.cc -- implement Span_score_bar
5 source file of the GNU LilyPond music typesetter
7 (c) 1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8 */
10 #include "piano-brace.hh"
11 #include "atom.hh"
12 #include "paper-def.hh"
13 #include "lookup.hh"
14 #include "main.hh"
16 Piano_brace::Piano_brace ()
18 extra_move_left_f_ = 0.0;
21 Molecule
22 Piano_brace::get_bar_sym (Real dy) const
24 Atom a = lookup_l ()->vbrace (dy);
25 a.translate_axis (-extra_move_left_f_, X_AXIS);
28 return a;
31 Interval
32 Piano_brace::do_width() const
34 return Interval (0,0);
37 void
38 Piano_brace::do_post_processing ()
40 Span_score_bar::do_post_processing();
41 Interval i = Span_score_bar::do_height ();
42 Real staffheight_f = paper ()->staffheight_f ();
44 // don't set braces that span only one staff
45 if (i.length () <= 2.0 * staffheight_f)
47 set_empty (true);
48 transparent_b_ = true;