]> git.donarmstrong.com Git - lilypond.git/commitdiff
* lily/dot-column.cc (side_position): reach stem via dots-> head->stem.
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Wed, 15 Feb 2006 13:02:17 +0000 (13:02 +0000)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Wed, 15 Feb 2006 13:02:17 +0000 (13:02 +0000)
* lily/dot-column-engraver.cc (class Dot_column_engraver): excise
stem handling.

* lily/bar-number-engraver.cc (process_music): document function
of whichBar.

* lily/score.cc (default_rendering): add pscore, not systems
themselves.

* lily/paper-book.cc (get_system_specs): separate generation of
titles and systems.

ChangeLog
lily/bar-number-engraver.cc
lily/dot-column-engraver.cc
lily/dot-column.cc
lily/paper-book.cc
lily/rhythmic-head.cc
lily/score.cc
lily/stem.cc

index 43a8741d1dd2be5d75ffa3f974be46f0588eb36b..3487999f3b640bea5fccdb2b7adeda947c25c743 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,16 @@
 2006-02-15  Han-Wen Nienhuys  <hanwen@xs4all.nl>
 
+       * lily/dot-column.cc (side_position): reach stem via dots-> head->stem.
+
+       * lily/dot-column-engraver.cc (class Dot_column_engraver): excise
+       stem handling.
+
+       * lily/bar-number-engraver.cc (process_music): document function
+       of whichBar.
+
+       * lily/score.cc (default_rendering): add pscore, not systems
+       themselves.
+
        * lily/paper-book.cc (get_system_specs): separate generation of
        titles and systems.
 
index 3d61cdcfd99eee88df518f4493c4f52c96264c88..57ad002f760b865ab83e2cf3f07b1da5b08bdd75 100644 (file)
@@ -101,7 +101,8 @@ Bar_number_engraver::create_items ()
 
 ADD_TRANSLATOR (Bar_number_engraver,
                /* doc */ "A bar number is created whenever measurePosition "
-               "is zero and there is a bar line. It is \n"
+               "is zero and when there is a bar line (ie. when @code{whichBar} is set. "
+               "It is \n"
                "put on top of all staves, and appears only at  left side of the staff. "
                "The staves are taken from @code{stavesFound}, which is maintained by "
                "@code{@ref{Staff_collecting_engraver}}. ",
index 65a16a094e125637575ebbb344b22bb86d6bfc76..a2b1cdf3a5bfd26765499739d86681a89fadb152 100644 (file)
 #include "dot-column.hh"
 #include "side-position-interface.hh"
 #include "engraver.hh"
-#include "stem.hh"
 #include "translator.icc"
 
 class Dot_column_engraver : public Engraver
 {
   Grob *dotcol_;
-  Grob *stem_;
   vector<Item*> heads_;
 public:
   TRANSLATOR_DECLARATIONS (Dot_column_engraver);
 
 protected:
 
-  DECLARE_ACKNOWLEDGER (stem);
   DECLARE_ACKNOWLEDGER (rhythmic_head);
 
   void stop_translation_timestep ();
@@ -32,23 +29,13 @@ protected:
 Dot_column_engraver::Dot_column_engraver ()
 {
   dotcol_ = 0;
-  stem_ = 0;
 }
 
 void
 Dot_column_engraver::stop_translation_timestep ()
 {
-  /*
-    Add the stem to the support so dots stay clear of flags.
-
-    See [Ross, p 171]
-  */
-  if (stem_ && dotcol_)
-    dotcol_->set_object ("stem", stem_->self_scm ());
-
   dotcol_ = 0;
   heads_.clear ();
-  stem_ = 0;
 }
 
 void
@@ -64,13 +51,7 @@ Dot_column_engraver::acknowledge_rhythmic_head (Grob_info info)
     }
 }
 
-void
-Dot_column_engraver::acknowledge_stem (Grob_info info)
-{
-  stem_ = info.grob ();
-}
 
-ADD_ACKNOWLEDGER (Dot_column_engraver, stem);
 ADD_ACKNOWLEDGER (Dot_column_engraver, rhythmic_head);
 ADD_TRANSLATOR (Dot_column_engraver,
                /* doc */ "Engraves dots on dotted notes shifted to the right of the note.\n"
index 2d01faa0268db39e3d16d74c4177ec5e7fd1d659..3ebddc69a015267561adb67a24a35a3f5a9a474e 100644 (file)
@@ -31,20 +31,26 @@ SCM
 Dot_column::side_position (SCM smob)
 {
   Grob *me = unsmob_grob (smob);
-  Grob *stem = unsmob_grob (me->get_object ("stem"));
-  if (stem
-      && !Stem::get_beam (stem)
-      && Stem::duration_log (stem) > 2
-      && !Stem::is_invisible (stem))
+  extract_grob_set (me, "dots", dots);
+  
+  for (vsize i = 0; i  < dots.size (); i++)
     {
-      /*
-       trigger stem end & direction calculation.
-
-       This will add the stem to the support if a flag collision happens.
-      */
-      stem->get_property ("stem-end-position");
+      Grob *head = dots[i]->get_parent (Y_AXIS);
+      Grob *stem = head ? unsmob_grob (head->get_object ("stem")) : 0;
+      if (stem
+         && !Stem::get_beam (stem)
+         && Stem::duration_log (stem) > 2
+         && !Stem::is_invisible (stem))
+       {
+         /*
+           trigger stem end & direction calculation.
+           
+           This will add the stem to the support if a flag collision happens.
+         */
+         stem->get_property ("stem-end-position");
+       }
     }
-  
+
   return Side_position_interface::x_aligned_side (smob);
 }
 
@@ -290,7 +296,8 @@ ADD_INTERFACE (Dot_column,
               "clash with staff lines ",
 
               /* properties */
+              "dots "
               "positioning-done "
               "direction "
-              "stem");
+              );
 
index c2fcf60f302bd7522c131038791380ee17508863..8ef498aaec847516fe388469e4d3f9db22e25bd8 100644 (file)
@@ -256,6 +256,7 @@ Paper_book::get_score_title (SCM header)
   return SCM_BOOL_F;
 }
 
+
 SCM
 Paper_book::get_system_specs ()
 {
index a024647d7727620b28ccdd8d4d0699fe38ecd267..ec368b8a51c90c1abf230716f1da6d2e89b632a9 100644 (file)
@@ -48,7 +48,14 @@ Rhythmic_head::duration_log (Grob *me)
   return scm_is_number (s) ? scm_to_int (s) : 0;
 }
 
-ADD_INTERFACE (Rhythmic_head, "rhythmic-head-interface",
+ADD_INTERFACE (Rhythmic_head,
+
+              "rhythmic-head-interface",
+
               "Note head or rest",
-              "dot stem duration-log");
+              
+              "dot "
+              "duration-log"
+              "stem "
+              );
 
index c8fbf84056b7d3d667220d045195a6bd58c1d9a2..99ec51880a3672e5741447a5ff66864544cc1f73 100644 (file)
@@ -135,9 +135,7 @@ default_rendering (SCM music, SCM outdef,
       if (ly_is_module (header))
        paper_book->add_score (header);
 
-      SCM systems = pscore->get_paper_systems ();
-      paper_book->add_score (systems);
-
+      paper_book->add_score (pscore->self_scm ());
       paper_book->classic_output (outname);
       paper_book->unprotect ();
     }
index 3c1bdc326c39c8c4275029390421a3ec317dfe92..accada587de29a7d753557bf096f4fb303f2f540 100644 (file)
@@ -261,11 +261,12 @@ Stem::calc_stem_end_position (SCM smob)
       if (dots)
        {
          Real dp = Staff_symbol_referencer::get_position (dots);
-         Real flagy = flag (me).extent (Y_AXIS)[-dir] * 2 / ss;
+         Interval flag_yext = flag (me).extent (Y_AXIS) * (2 / ss) + stem_end;
 
          /* Very gory: add myself to the X-support of the parent,
             which should be a dot-column. */
-         if (dir * (stem_end + flagy - dp) < 0.5)
+         
+         if (flag_yext.distance (dp) < 0.5)
            {
              Grob *par = dots->get_parent (X_AXIS);