lilypond-1.3.7
[lilypond.git] / lily / breathing-sign.cc
blob3578e06210a094b203574576ba709f165f67a1b6
1 /*
2 breathing_sign.cc -- implement Breathing_sign
4 Copyright (C) 1999 Michael Krause
6 written for the GNU LilyPond music typesetter
8 TODO: --> see breathing-sign-engraver.cc
12 #include "breathing-sign.hh"
13 #include "string.hh"
14 #include "molecule.hh"
15 #include "paper-def.hh"
16 #include "lookup.hh"
17 #include "debug.hh"
18 #include "dimensions.hh"
19 #include "direction.hh"
22 Breathing_sign::Breathing_sign ()
24 set_direction (UP);
25 set_elt_property ("breakable", SCM_BOOL_T);
30 Molecule*
31 Breathing_sign::do_brew_molecule_p () const
33 Real dl = staff_line_leading_f();
34 Interval i1(0, dl / 6), i2(-dl / 2, dl / 2);
35 Box b(i1, i2);
37 Molecule *output = new Molecule (lookup_l()->filledbox(b));
39 return output;
42 void
43 Breathing_sign::do_post_processing()
45 Real dl = staff_line_leading_f();
47 translate_axis(2.0 * dl * get_direction (), Y_AXIS);