]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/heads-engraver.cc
release: 1.1.54
[lilypond.git] / lily / heads-engraver.cc
index 4e894ba4383d46692e6d7bb8f0f44a4768c29b9a..fee3bd41b0301f22d6cfef464122e31434cb8e5e 100644 (file)
@@ -1,7 +1,7 @@
 /*
   head-grav.cc -- part of GNU LilyPond
 
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+  (c)  1997--1999 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 #include "note-head.hh"
@@ -16,13 +16,17 @@ Note_heads_engraver::Note_heads_engraver()
 }
 
 bool
-Note_heads_engraver::do_try_music (Music *req_l
+Note_heads_engraver::do_try_music (Music *m
 {
-  if (Note_req * n =dynamic_cast <Note_req *> (req_l))
+  if (Note_req * n =dynamic_cast <Note_req *> (m))
     {
       note_req_l_arr_.push (n);
       return true;
     }
+  if (Tonic_req* t = dynamic_cast<Tonic_req*> (m))
+    {
+      return true;
+    }
   return false;
 }
 
@@ -32,6 +36,7 @@ Note_heads_engraver::do_process_requests()
   if (note_p_arr_.size ())
     return ;
   
+  String noteheadstyle = get_property ("noteHeadStyle", 0);
   for (int i=0; i < note_req_l_arr_.size (); i++)
     {
       Note_head *note_p  = new Note_head;
@@ -46,13 +51,17 @@ Note_heads_engraver::do_process_requests()
          dot_p_arr_.push (d);
        }
 
-      note_p->steps_i_ = note_req_l->pitch_.steps ();
-      //      note_p->position_i_ = note_req_l->pitch_.steps ();
+      //      note_p->steps_i_ = note_req_l->pitch_.steps ();
+      note_p->position_i_ = note_req_l->pitch_.steps ();
 
-      String noteheadstyle = get_property ("noteheadStyle", 0);
-      if (noteheadstyle.length_i ())
-        note_p->note_head_type_str_ = noteheadstyle;
-  
+
+      if (noteheadstyle == "transparent")
+       note_p->set_elt_property (transparent_scm_sym, SCM_BOOL_T);
+      else 
+        note_p->set_elt_property (style_scm_sym,
+                                 gh_str02scm (noteheadstyle.ch_C()));
+
+      
       Score_element_info itinf (note_p,note_req_l);
       announce_element (itinf);
       note_p_arr_.push (note_p);