]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/stem.cc
Doc-fr: AU - document -dhelp CLI options
[lilypond.git] / lily / stem.cc
index 8eaf2321ea3ecdb669df157bf959cfa4ff706c11..5195b6cfab814887acd0ed079f930cfe4130e89f 100644 (file)
@@ -236,18 +236,23 @@ Stem::extremal_heads (Grob *me)
   return exthead;
 }
 
-/* The positions, in ascending order.  */
+/* The staff positions, in ascending order.
+ * If FILTER, include the main column of noteheads only */
 vector<int>
-Stem::note_head_positions (Grob *me)
+Stem::note_head_positions (Grob *me, bool filter)
 {
   vector<int> ps;
   extract_grob_set (me, "note-heads", heads);
+  Grob *xref = common_refpoint_of_array (heads, me, X_AXIS);
 
   for (vsize i = heads.size (); i--;)
     {
       Grob *n = heads[i];
-      int p = Staff_symbol_referencer::get_rounded_position (n);
+      if (filter
+          && n->relative_coordinate (xref, X_AXIS) != 0.0)
+        continue;
 
+      int p = Staff_symbol_referencer::get_rounded_position (n);
       ps.push_back (p);
     }
 
@@ -278,7 +283,7 @@ bool
 Stem::is_normal_stem (Grob *me)
 {
   if (!head_count (me))
-     return false;
+    return false;
 
   extract_grob_set (me, "note-heads", heads);
   SCM style = heads[0]->get_property ("style");
@@ -1133,6 +1138,7 @@ ADD_INTERFACE (Stem,
                "stemlet-length "
                "thickness "
                "tremolo-flag "
+               "tuplet-start "
               );
 
 /****************************************************************/