]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/multi-measure-rest.cc
* scm/lily.scm (ly:all-stencil-expressions):
[lilypond.git] / lily / multi-measure-rest.cc
index b04768dfea24e089dc307fd95f44f55820d531f8..49b6c7b63179b15ab7b78413b71881c467bbe5f4 100644 (file)
@@ -9,7 +9,7 @@
 
 #include "multi-measure-rest.hh"
 #include "warn.hh"
-#include "paper-def.hh"
+#include "output-def.hh"
 #include "paper-column.hh" // urg
 #include "font-interface.hh"
 #include "rest.hh"
@@ -102,9 +102,9 @@ Multi_measure_rest::print (SCM smob)
 
   int measures = 0;
   SCM m (me->get_property ("measure-count"));
-  if (gh_number_p (m))
+  if (ly_c_number_p (m))
     {
-      measures = gh_scm2int (m);
+      measures = ly_scm2int (m);
     }
 
   mol.translate_axis (x_off, X_AXIS);
@@ -118,16 +118,16 @@ Multi_measure_rest::symbol_stencil (Grob *me, Real space)
 {
   int measures = 0;
   SCM m (me->get_property ("measure-count"));
-  if (gh_number_p (m))
+  if (ly_c_number_p (m))
     {
-      measures = gh_scm2int (m);
+      measures = ly_scm2int (m);
     }
   if (measures <= 0)
     return Stencil ();
   
 
   SCM limit = me->get_property ("expand-limit");
-  if (measures > gh_scm2int (limit))
+  if (measures > ly_scm2int (limit))
     {
       Real padding = 0.15;  
       Stencil s =  big_rest (me, (1.0 - 2*padding) * space);
@@ -135,7 +135,7 @@ Multi_measure_rest::symbol_stencil (Grob *me, Real space)
       return s;
     }
 
-  SCM alist_chain = Font_interface::font_alist_chain (me);
+  SCM alist_chain = Font_interface::text_font_alist_chain (me);
 
   Real staff_space = Staff_symbol_referencer::staff_space (me);
   Font_metric *musfont
@@ -144,7 +144,7 @@ Multi_measure_rest::symbol_stencil (Grob *me, Real space)
   SCM sml = me->get_property ("use-breve-rest");
   if (measures == 1)
     {
-      if (sml == SCM_BOOL_T)
+      if (to_boolean (sml))
        {
          Stencil s = musfont->find_by_name (Rest::glyph_name (me, -1, ""));
 
@@ -185,7 +185,7 @@ Multi_measure_rest::big_rest (Grob *me, Real width)
 
 
   Real ss = Staff_symbol_referencer::staff_space (me);
-  Real slt = me->get_paper ()->get_realvar (ly_symbol2scm ("linethickness"));
+  Real slt = me->get_paper ()->get_dimension (ly_symbol2scm ("linethickness"));
   Real y = slt * thick_thick/2 * ss;
   Real ythick = hair_thick * slt * ss;
   Box b (Interval (0,  0 >? (width - 2 * ythick)), Interval (-y, y));
@@ -239,7 +239,7 @@ Multi_measure_rest::church_rest (Grob*me, Font_metric *musfont, int measures,
 
          Stencil r (musfont->find_by_name ("rests-" + to_string (k)));
          symbols_width += r.extent (X_AXIS).length ();
-         mols = gh_cons (r.smobbed_copy (), mols);
+         mols = scm_cons (r.smobbed_copy (), mols);
        }
        else
        {
@@ -267,7 +267,7 @@ Multi_measure_rest::church_rest (Grob*me, Font_metric *musfont, int measures,
              r.translate_axis (staff_space, Y_AXIS);
            }
          symbols_width += r.extent (X_AXIS).length ();
-         mols = gh_cons (r.smobbed_copy (), mols);
+         mols = scm_cons (r.smobbed_copy (), mols);
        }
       count ++;
     }
@@ -282,9 +282,9 @@ Multi_measure_rest::church_rest (Grob*me, Font_metric *musfont, int measures,
     }
   
   Stencil mol; 
-  for (SCM  s = mols; gh_pair_p (s); s = gh_cdr (s))
+  for (SCM  s = mols; ly_c_pair_p (s); s = ly_cdr (s))
     {
-      mol.add_at_edge (X_AXIS, LEFT, *unsmob_stencil (gh_car (s)), inner_padding, 0);
+      mol.add_at_edge (X_AXIS, LEFT, *unsmob_stencil (ly_car (s)), inner_padding, 0);
     }
   mol.align_to (X_AXIS, LEFT);
   mol.translate_axis (outer_padding_factor *  inner_padding, X_AXIS);
@@ -317,13 +317,16 @@ Multi_measure_rest::set_spacing_rods (SCM smob)
   Item * lb = l->find_prebroken_piece (RIGHT);
   Item * rb = r->find_prebroken_piece (LEFT);      
   
-  Item* combinations[4][2]={{l,r}, {lb,r}, {l,rb},{lb,rb}};
+  Item* combinations[4][2] = {{l,r},
+                             {lb,r},
+                             {l,rb},
+                             {lb,rb}};
 
   Real sym_width = symbol_stencil (me, 0.0).extent (X_AXIS).length ();
   
   for (int i=0; i < 4; i++)
     {
-      Item * l =  combinations[i][0];
+      Item *l = combinations[i][0];
       Item *r = combinations[i][1];
 
       if (!l || !r)