]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/mensural-ligature-engraver.cc
* lily/side-position-interface.cc: remove add_staff_support ()
[lilypond.git] / lily / mensural-ligature-engraver.cc
index 8c73fb6ceca9326de3d2d5b05dd8ff56723df19d..f982a11ac7afa8332da5a2bfa0068aa66efb9161 100644 (file)
@@ -73,7 +73,7 @@ Mensural_ligature_engraver::Mensural_ligature_engraver ()
 Spanner *
 Mensural_ligature_engraver::create_ligature_spanner ()
 {
-  return new Spanner (get_property ("MensuralLigature"));
+  return make_spanner ("MensuralLigature");
 }
 
 /*
@@ -325,14 +325,6 @@ Mensural_ligature_engraver::transform_heads (Array<Grob_info> primitives)
   // TODO: if (state == STATE_ERROR) { ... }
 }
 
-void set_delta_pitch (Item *primitive, Grob_info info1, Grob_info info2)
-{
-  Pitch pitch1 = *unsmob_pitch (info1.music_cause ()->get_mus_property ("pitch"));
-  Pitch pitch2 = *unsmob_pitch (info2.music_cause ()->get_mus_property ("pitch"));
-  int delta_pitch = (pitch2.steps () - pitch1.steps ());
-  primitive->set_grob_property ("delta-pitch", gh_int2scm (delta_pitch));
-}
-
 /*
  * A MensuralLigature grob consists of a bunch of NoteHead grobs that
  * are glued together.  It (a) does not make sense to change
@@ -351,17 +343,13 @@ void
 Mensural_ligature_engraver::propagate_properties (Spanner *ligature,
                                                  Array<Grob_info> primitives)
 {
-  SCM thickness_scm = ligature->get_grob_property ("thickness");
-  Real thickness = (thickness_scm != SCM_EOL) ?
-    gh_scm2double (thickness_scm) : 1.4;
-  thickness *= ligature->get_paper ()->get_var ("linethickness");
+  Real thickness = robust_scm2double (ligature->get_grob_property ("thickness"), 1.4);
+  thickness *= ligature->get_paper ()->get_realvar (ly_symbol2scm ("linethickness"));
 
   Real head_width =
     Font_interface::get_default_font (ligature)->
     find_by_name ("noteheads--1mensural").extent (X_AXIS).length ();
-  SCM flexa_width_scm = ligature->get_grob_property ("flexa-width");
-  Real flexa_width = (flexa_width_scm != SCM_EOL) ?
-    gh_scm2double (flexa_width_scm) : 2.0;
+    Real flexa_width = robust_scm2double (ligature->get_grob_property ("flexa-width"), 2);
   flexa_width *= Staff_symbol_referencer::staff_space (ligature);
 
   Real half_flexa_width = 0.5 * (flexa_width + thickness);
@@ -390,8 +378,6 @@ Mensural_ligature_engraver::propagate_properties (Spanner *ligature,
                                        gh_double2scm (half_flexa_width));
          primitive->set_grob_property ("flexa-width",
                                        gh_double2scm (flexa_width));
-         set_delta_pitch (primitive,
-                          primitives[i], primitives[i+1]);
          break;
        default:
          programming_error (_f ("unexpected case fall-through"));
@@ -417,13 +403,6 @@ Mensural_ligature_engraver::fold_up_primitives (Array<Grob_info> primitives)
 
       if (i > 0)
        {
-#if 0
-         Rod r;
-         r.distance_ = distance;
-         r.item_l_drul_[LEFT] = first;
-         r.item_l_drul_[RIGHT] = current;
-         r.add_to_cols ();
-#endif
          current->translate_axis (distance, X_AXIS);
        }