]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/vaticana-ligature-engraver.cc
trim duplicate headers.
[lilypond.git] / lily / vaticana-ligature-engraver.cc
index 391c32c4632d41be93a496f0ae5ba76216b4bb8c..608cb16c66c87b23c5ed7411d29b4f565d4322d2 100644 (file)
  * negative impact, since dotted notes appear within a ligature
  * usually always at the end of the ligature, such that the bug never
  * should apply for valid ligatures.
+ *
+ * TODO: Graduale Triplex, tempus per annum, hebdomada septima,
+ * alleluia (page 280) shows a counter-example for collecting dots
+ * always in a single column behind the ligature.  Maybe only the last
+ * two dots in a ligature should be collected and all other dots put
+ * behind or on top of the head?
  */
 class Vaticana_ligature_engraver : public Gregorian_ligature_engraver
 {
@@ -54,7 +60,7 @@ private:
                    Real thickness);
   void check_for_prefix_loss (Item *primitive);
   void check_for_ambiguous_dot_pitch (Grob_info primitive);
-  void add_mora_column (Grob *paper_column);
+  void add_mora_column (Paper_column *column);
   vector<Grob_info> augmented_primitives_;
 
 public:
@@ -344,8 +350,7 @@ Vaticana_ligature_engraver::align_heads (vector<Grob_info> primitives,
       /*
        * Horizontally line-up this head to form a ligature.
        */
-      get_set_column (primitive, column);
-      primitive->translate_axis (ligature_width, X_AXIS);
+      move_related_items_to_column (primitive, column, ligature_width);
       ligature_width += head_width;
 
       prev_primitive = primitive;
@@ -387,18 +392,18 @@ Vaticana_ligature_engraver::check_for_prefix_loss (Item *primitive)
 }
 
 void
-Vaticana_ligature_engraver::add_mora_column (Grob *paper_column)
+Vaticana_ligature_engraver::add_mora_column (Paper_column *column)
 {
   if (augmented_primitives_.size () == 0) // no dot for column
     return;
-  if (!paper_column) // empty ligature???
+  if (!column) // empty ligature???
     {
       augmented_primitives_[0].grob ()->
        programming_error ("no paper column to add dot");
       return;
     }
   Item *dotcol = make_item ("DotColumn", SCM_EOL);
-  dotcol->set_parent (paper_column, X_AXIS);
+  dotcol->set_parent (column, X_AXIS);
   for (vsize i = 0; i < augmented_primitives_.size (); i++)
     {
       Item *primitive =
@@ -699,7 +704,7 @@ Vaticana_ligature_engraver::transform_heads (Spanner *ligature,
   align_heads (primitives, flexa_width, thickness);
 
   // append all dots to paper column of ligature's last head
-  add_mora_column (prev_primitive->get_parent (X_AXIS));
+  add_mora_column (prev_primitive->get_column ());
 
 #if 0 // experimental code to collapse spacing after ligature
   /* TODO: set to max (old/new spacing-increment), since other
@@ -719,6 +724,5 @@ ADD_ACKNOWLEDGER (Vaticana_ligature_engraver, note_head);
 ADD_TRANSLATOR (Vaticana_ligature_engraver,
                /* doc */ "Handles ligatures by glueing special ligature heads together.",
                /* create */ "VaticanaLigature DotColumn",
-               /* accept */ "ligature-event",
                /* read */ "",
                /* write */ "");