written for the GNU LilyPond music typesetter
-TODO: --> see breathing-sign-engraver.cc
+ TODO: --> see breathing-sign-engraver.cc
*/
#include "staff-symbol-referencer.hh"
+#include "directional-element-interface.hh"
#include "breathing-sign.hh"
#include "string.hh"
Breathing_sign::Breathing_sign ()
{
- set_direction (UP);
set_elt_property ("breakable", SCM_BOOL_T);
}
-
-
-Molecule*
-Breathing_sign::do_brew_molecule_p () const
+Molecule
+Breathing_sign::do_brew_molecule () const
{
Staff_symbol_referencer_interface si (this);
- Real dl = si.staff_line_leading_f();
- Interval i1(0, dl / 6), i2(-dl / 2, dl / 2);
+ Real space = si.staff_space();
+ Interval i1(0, space / 6), i2(-space / 2, space / 2);
Box b(i1, i2);
- Molecule *output = new Molecule (lookup_l()->filledbox(b));
-
- return output;
+ return lookup_l()->filledbox(b);
}
void
-Breathing_sign::do_post_processing()
+Breathing_sign::after_line_breaking ()
{
- Real dl = Staff_symbol_referencer_interface (this).staff_line_leading_f();
-
- translate_axis(2.0 * dl * get_direction (), Y_AXIS);
+ Real space = staff_symbol_referencer (this).staff_space();
+ Direction d = directional_element (this). get ();
+ if (!d)
+ {
+ d = UP;
+ directional_element(this).set (d);
+ }
+
+ translate_axis(2.0 * space * d, Y_AXIS);
}