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 "staff-symbol-referencer.hh"
13 #include "directional-element-interface.hh"
14 #include "breathing-sign.hh"
16 #include "molecule.hh"
17 #include "paper-def.hh"
20 #include "dimensions.hh"
21 #include "direction.hh"
23 MAKE_SCHEME_CALLBACK (Breathing_sign
,brew_molecule
,1);
25 Breathing_sign::brew_molecule (SCM smob
)
27 Grob
* me
= unsmob_grob (smob
);
28 Real space
= Staff_symbol_referencer::staff_space (me
);
31 Interval
i1 (0, space
/ 6), i2 (-space
/ 2, space
/ 2);
34 return Lookup::filledbox (b
).smobbed_copy ();
37 MAKE_SCHEME_CALLBACK (Breathing_sign
,offset_callback
,2);
39 Breathing_sign::offset_callback (SCM element_smob
, SCM
)
41 Grob
*me
= unsmob_grob (element_smob
);
43 Direction d
= Directional_element_interface::get (me
);
47 Directional_element_interface::set (me
, d
);
50 Real inter_f
= Staff_symbol_referencer::staff_space (me
)/2;
51 int sz
= Staff_symbol_referencer::line_count (me
)-1;
52 return gh_double2scm (inter_f
* sz
* d
);
56 ADD_INTERFACE(Breathing_sign
, "breathing-sign-interface",