]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/stem-tremolo.cc
Comment-out \fetaflat,
[lilypond.git] / lily / stem-tremolo.cc
index 84a70cc432e732ea8588ccb98e0daf41f7f26f12..3e88861cca6910471384a840bee0151c2687bf97 100644 (file)
@@ -7,13 +7,15 @@
   
  */
 
+#include "stem-tremolo.hh"
+
+#include "spanner.hh"
 #include "beam.hh"
 #include "directional-element-interface.hh"
 #include "item.hh"
 #include "lookup.hh"
 #include "output-def.hh"
 #include "staff-symbol-referencer.hh"
-#include "stem-tremolo.hh"
 #include "stem.hh"
 #include "warn.hh"
 
@@ -36,7 +38,7 @@ MAKE_SCHEME_CALLBACK (Stem_tremolo, height, 2);
 SCM
 Stem_tremolo::height (SCM smob, SCM ax)
 {
-  Axis a = (Axis)ly_scm2int (ax);
+  Axis a = (Axis)scm_to_int (ax);
   Grob *me = unsmob_grob (smob);
   assert (a == Y_AXIS);
 
@@ -52,15 +54,14 @@ Stencil
 Stem_tremolo::raw_stencil (Grob *me)
 {
   Grob *stem = unsmob_grob (me->get_property ("stem"));
-  Grob *beam = Stem::get_beam (stem);
-  
+  Spanner*beam = Stem::get_beam (stem);
   Real dydx;
   if (beam)
     {
       Real dy = 0;
       SCM s = beam->get_property ("positions");
       if (is_number_pair (s))
-       dy = -ly_scm2double (ly_car (s)) +ly_scm2double (ly_cdr (s));
+       dy = -scm_to_double (scm_car (s)) +scm_to_double (scm_cdr (s));
       
       Real dx = Beam::last_visible_stem (beam)->relative_coordinate (0, X_AXIS)
        - Beam::first_visible_stem (beam)->relative_coordinate (0, X_AXIS);
@@ -73,7 +74,7 @@ Stem_tremolo::raw_stencil (Grob *me)
   Real ss = Staff_symbol_referencer::staff_space (me);
   Real thick = robust_scm2double (me->get_property ("beam-thickness"),1);
   Real width = robust_scm2double (me->get_property ("beam-width"),1);
-  Real blot = me->get_paper ()->get_dimension (ly_symbol2scm ("blotdiameter"));
+  Real blot = me->get_layout ()->get_dimension (ly_symbol2scm ("blotdiameter"));
 
   width *= ss;
   thick *= ss;
@@ -83,8 +84,8 @@ Stem_tremolo::raw_stencil (Grob *me)
   
   int tremolo_flags = 0;
   SCM s = me->get_property ("flag-count");
-  if (ly_c_number_p (s))
-    tremolo_flags = ly_scm2int (s);
+  if (scm_is_number (s))
+    tremolo_flags = scm_to_int (s);
 
   if (!tremolo_flags)
     {
@@ -119,7 +120,7 @@ Stem_tremolo::print (SCM grob)
       return SCM_EOL;
     }
   
-  Grob *beam = Stem::get_beam (stem);
+  Spanner *beam = Stem::get_beam (stem);
   Direction stemdir = Stem::get_direction (stem);
   if (stemdir == 0)
     stemdir = UP;
@@ -138,8 +139,8 @@ Stem_tremolo::print (SCM grob)
 
   Real beamthickness = 0.0;
   SCM sbt = (beam) ? beam->get_property ("thickness") : SCM_EOL ;
-  if (ly_c_number_p (sbt))
-    beamthickness = ly_scm2double (sbt) * ss;
+  if (scm_is_number (sbt))
+    beamthickness = scm_to_double (sbt) * ss;
 
   Real end_y
     = Stem::stem_end_position (stem) * ss / 2