lilypond-1.3.130
[lilypond.git] / lily / pitch-squash-engraver.cc
blob86eb47298050d9031df0cb8fe92a9383081511e2
1 /*
2 pitch-squash-grav.cc -- implement Pitch_squash_engraver
4 source file of the GNU LilyPond music typesetter
6 (c) 1997--2000 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8 */
9 #include "staff-symbol-referencer.hh"
10 #include "note-head.hh"
11 #include "rhythmic-head.hh"
12 #include "engraver.hh"
14 class Pitch_squash_engraver : public Engraver {
15 public:
16 VIRTUAL_COPY_CONS (Translator);
17 virtual void acknowledge_grob (Grob_info);
21 void
22 Pitch_squash_engraver::acknowledge_grob (Grob_info i)
24 SCM newpos = get_property ("squashedPosition");
25 if (Note_head::has_interface (i.elem_l_))
27 i.elem_l_->set_grob_property ("staff-position", newpos);
31 ADD_THIS_TRANSLATOR (Pitch_squash_engraver);