2 script.cc -- implement Script
4 source file of the GNU LilyPond music typesetter
6 (c) 1999 Han-Wen Nienhuys <hanwen@cs.uu.nl>
13 #include "side-position-interface.hh"
14 #include "paper-def.hh"
15 #include "dimension-cache.hh"
19 Script::get_molecule(Direction d) const
21 SCM s = get_elt_property ("molecule");
22 assert (s != SCM_UNDEFINED);
25 if (key == ly_symbol2scm ("feta"))
27 return lookup_l ()->afm_find ("scripts-" +
28 ly_scm2string (index_cell (gh_cdr (s), d)));
30 else if (key == ly_symbol2scm ("accordion"))
32 return lookup_l ()->accordion (s, paper_l()->get_var("interline"));
42 Script::do_pre_processing ()
45 center my self on the note head.
47 Score_element * e = parent_l(X_AXIS);
48 translate_axis (e->extent (X_AXIS).center (), X_AXIS);
52 Script::do_post_processing ()
54 Direction d = Side_position_interface (this).get_direction ();
55 Molecule m (get_molecule(d));
59 Script::do_brew_molecule_p () const
62 SCM d = get_elt_property ("direction");
66 return new Molecule (get_molecule (dir));