]> git.donarmstrong.com Git - lilypond.git/blob - lily/breathing-sign.cc
patch::: 1.3.14.hwn1
[lilypond.git] / lily / breathing-sign.cc
1 /*
2   breathing_sign.cc -- implement Breathing_sign
3
4   Copyright (C) 1999 Michael Krause
5
6   written for the GNU LilyPond music typesetter
7
8 TODO: --> see breathing-sign-engraver.cc
9
10 */
11 #include "staff-symbol-referencer.hh"
12
13 #include "breathing-sign.hh"
14 #include "string.hh"
15 #include "molecule.hh"
16 #include "paper-def.hh"
17 #include "lookup.hh"
18 #include "debug.hh"
19 #include "dimensions.hh"
20 #include "direction.hh"
21
22
23 Breathing_sign::Breathing_sign ()
24 {
25   set_direction (UP);
26   set_elt_property ("breakable", SCM_BOOL_T);
27 }
28
29
30
31 Molecule*
32 Breathing_sign::do_brew_molecule_p () const
33 {
34   Staff_symbol_referencer_interface si (this);
35   
36   Real dl = si.staff_space();
37   Interval i1(0, dl / 6), i2(-dl / 2, dl / 2);
38   Box b(i1, i2);
39
40   Molecule *output = new Molecule (lookup_l()->filledbox(b));
41
42   return output;
43 }
44
45 void
46 Breathing_sign::do_post_processing()
47 {
48   Real dl = Staff_symbol_referencer_interface (this).staff_space();
49
50   translate_axis(2.0 * dl * get_direction (), Y_AXIS);
51 }
52