]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/slur.cc
* lily/note-column.cc: reformat.
[lilypond.git] / lily / slur.cc
index d8c81f7836337258a4d1a09e9344d1a8f1f24070..0c68a6137e5be1891bf260da27f9e0a8b612aff6 100644 (file)
@@ -165,7 +165,7 @@ Slur::get_curve (Grob *me)
 {
   Bezier b;
   int i = 0;
-  for (SCM s = me->get_property ("control-points"); scm_is_pair (s);
+  for (SCM s = me->get_property ("control-points"); s != SCM_EOL;
        s = scm_cdr (s))
     b.control_[i++] = ly_scm2offset (scm_car (s));
 
@@ -186,7 +186,7 @@ Slur::add_extra_encompass (Grob *me, Grob *n)
 }
 
 
-MAKE_SCHEME_CALLBACK_WITH_OPTARGS (Slur, outside_slur_callback, 2, 1);
+MAKE_SCHEME_CALLBACK (Slur, outside_slur_callback, 2);
 SCM
 Slur::outside_slur_callback (SCM grob, SCM offset_scm)
 {
@@ -216,8 +216,8 @@ Slur::outside_slur_callback (SCM grob, SCM offset_scm)
   Interval yext = robust_relative_extent (script, cy, Y_AXIS);
   Interval xext = robust_relative_extent (script, cx, X_AXIS);
 
-  Real offset = robust_scm2double (offset_scm, 0);
-  yext.translate (offset);
+  yext.translate (robust_scm2double (offset_scm, 0));
+  
   
   /* FIXME: slur property, script property?  */
   Real slur_padding = robust_scm2double (script->get_property ("slur-padding"),
@@ -258,7 +258,7 @@ Slur::outside_slur_callback (SCM grob, SCM offset_scm)
       avoidance_offset = dir * (max (dir * avoidance_offset,
                                     dir * (ys[k] - yext[-dir] + dir * slur_padding)));
   
-  return scm_from_double (offset + avoidance_offset);
+  return scm_from_double (scm_to_double (offset_scm) + avoidance_offset);
 }
 
 /*
@@ -266,8 +266,7 @@ Slur::outside_slur_callback (SCM grob, SCM offset_scm)
  */
 void
 Slur::auxiliary_acknowledge_extra_object (Grob_info info,
-                                         vector<Grob*> &slurs,
-                                         vector<Grob*> &end_slurs)
+  vector<Grob*>& slurs, vector<Grob*>& end_slurs)
 {
   if (slurs.empty () && end_slurs.empty ())
     return;