]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/staff-symbol.cc
*** empty log message ***
[lilypond.git] / lily / staff-symbol.cc
index e8242d83fc0c5687e100f33531450dd8ccaffdd7..34941c84b6a65787a3d5e4c3cef76b415f9a2598 100644 (file)
@@ -8,7 +8,7 @@
 
 #include "lookup.hh"
 #include "dimensions.hh"
-#include "paper-def.hh"
+#include "output-def.hh"
 #include "stencil.hh"
 #include "warn.hh"
 #include "item.hh"
@@ -38,11 +38,14 @@ Staff_symbol::print (SCM smob)
 
     --hwn.
    */
+  Real t = me->get_paper ()->get_dimension (ly_symbol2scm ("linethickness"));
+  t *= robust_scm2double (me->get_property ("thickness"), 1.0);
+  
   Direction d = LEFT;
   do
     {
       SCM width_scm = me->get_property ("width");
-      if (d == RIGHT && ly_number_p (width_scm))
+      if (d == RIGHT && ly_c_number_p (width_scm))
        {
          /*
            don't multiply by Staff_symbol_referencer::staff_space (me),
@@ -60,13 +63,12 @@ Staff_symbol::print (SCM smob)
              && !x->extent (x, X_AXIS).is_empty ())
            span_points[d] += x->extent (x, X_AXIS)[d];
        }
+
+      span_points[d] -= d* t/2;
     }
   while (flip (&d) !=LEFT);
 
 
-  Real t = me->get_paper ()->get_dimension (ly_symbol2scm ("linethickness"));
-  t *= robust_scm2double (me->get_property ("thickness"), 1.0);
-  
   int l = Staff_symbol::line_count (me);
   
   Real height = (l-1) * staff_space (me) /2;
@@ -95,7 +97,7 @@ int
 Staff_symbol::line_count (Grob*me) 
 {
   SCM c = me->get_property ("line-count");
-  if (ly_number_p (c))
+  if (ly_c_number_p (c))
     return ly_scm2int (c);
   else
     return 0;
@@ -104,7 +106,7 @@ Staff_symbol::line_count (Grob*me)
 Real
 Staff_symbol::staff_space (Grob*me)
 {
-  return robust_scm2double ( me->get_property ("staff-space"), 1.0);
+  return robust_scm2double (me->get_property ("staff-space"), 1.0);
 }
 
 Real