]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/rhythmic-head.cc
release: 1.3.11
[lilypond.git] / lily / rhythmic-head.cc
index 171c93cb7b9f6071efe13bfb896bf9441acb2388..9e354bde2f0e4108e337be94bc8766019620f418 100644 (file)
@@ -16,6 +16,7 @@
 #include "axis-group-element.hh"
 #include "paper-score.hh"
 #include "stem.hh"
+#include "staff-symbol-referencer.hh"
 
 
 Dots*
@@ -25,6 +26,14 @@ Rhythmic_head::dots_l () const
   return dynamic_cast<Dots*> (unsmob_element (s));
 }
 
+int
+Rhythmic_head::balltype_i () const
+{
+  SCM s = get_elt_property ("duration-log");
+  
+  return gh_number_p (s) ? gh_scm2int (s) : 0;
+}
+
 Stem*
 Rhythmic_head::stem_l () const
 {
@@ -41,9 +50,11 @@ Rhythmic_head::dots_i () const
 void
 Rhythmic_head::do_post_processing ()
 {
-  if (dots_l ())
+  if (Dots *d = dots_l ())
     {
-      dots_l ()->set_position(int (position_f ()));
+      Staff_symbol_referencer_interface si (d);
+      Staff_symbol_referencer_interface me (d);      
+      si.set_position(int (me.position_f ()));
     }
 }
 
@@ -55,18 +66,4 @@ Rhythmic_head::add_dots (Dots *dot_l)
   dot_l->add_dependency (this);  
 }
 
-Rhythmic_head::Rhythmic_head ()
-{
-  balltype_i_ =0;
-}
-
-
-
-void
-Rhythmic_head::do_print () const
-{
-#ifndef NPRINT
-  DEBUG_OUT << "balltype = "<< balltype_i_ << "dots = " << dots_i ();
-#endif
-}