]> git.donarmstrong.com Git - lilypond.git/commitdiff
trill-pitch-engraver: acknowledge stems and flags; issue 3465
authorKeith OHara <k-ohara5a5a@oco.net>
Tue, 13 Aug 2013 07:31:49 +0000 (00:31 -0700)
committerKeith OHara <k-ohara5a5a@oco.net>
Sat, 24 Aug 2013 08:26:38 +0000 (01:26 -0700)
lily/pitched-trill-engraver.cc
scm/define-grobs.scm

index ef49b217d14ff2f2dad2fc79afa604c25a9a675f..c2a02e71d9e213a2db91bb409955a5f7e5277bec 100644 (file)
@@ -38,6 +38,8 @@ public:
 protected:
   DECLARE_ACKNOWLEDGER (note_head);
   DECLARE_ACKNOWLEDGER (dots);
+  DECLARE_ACKNOWLEDGER (stem);
+  DECLARE_ACKNOWLEDGER (flag);
   DECLARE_ACKNOWLEDGER (trill_spanner);
   void stop_translation_timestep ();
 
@@ -64,6 +66,16 @@ Pitched_trill_engraver::acknowledge_dots (Grob_info info)
   heads_.push_back (info.grob ());
 }
 void
+Pitched_trill_engraver::acknowledge_stem (Grob_info info)
+{
+  heads_.push_back (info.grob ());
+}
+void
+Pitched_trill_engraver::acknowledge_flag (Grob_info info)
+{
+  heads_.push_back (info.grob ());
+}
+void
 Pitched_trill_engraver::acknowledge_note_head (Grob_info info)
 {
   heads_.push_back (info.grob ());
@@ -159,6 +171,8 @@ Pitched_trill_engraver::stop_translation_timestep ()
 
 ADD_ACKNOWLEDGER (Pitched_trill_engraver, note_head);
 ADD_ACKNOWLEDGER (Pitched_trill_engraver, dots);
+ADD_ACKNOWLEDGER (Pitched_trill_engraver, stem);
+ADD_ACKNOWLEDGER (Pitched_trill_engraver, flag);
 ADD_ACKNOWLEDGER (Pitched_trill_engraver, trill_spanner);
 
 ADD_TRANSLATOR (Pitched_trill_engraver,
index e2b9e6acd71ae30503899413a3b3c923fd45b478..86bf7c15a931d0b045cf088f3b8b8a015c99dc7f 100644 (file)
         (side-axis . ,X)
         (stencil . ,parenthesize-elements)
         (stencils . ,parentheses-item::calc-parenthesis-stencils)
-        (X-offset . ,ly:side-position-interface::x-aligned-side)
+        ;; offset a bit to the right, further if needed to clear the main note
+        (X-offset . ,(lambda (grob)
+                       (ly:side-position-interface::x-aligned-side grob 2.5)))
         (Y-extent . ,grob::always-Y-extent-from-stencil)
         (meta . ((class . Item)
                  (interfaces . (axis-group-interface