]> git.donarmstrong.com Git - lilypond.git/commitdiff
(print): fix X start/end points of isolated
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Wed, 24 Aug 2005 20:36:03 +0000 (20:36 +0000)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Wed, 24 Aug 2005 20:36:03 +0000 (20:36 +0000)
beamlets.

ChangeLog
lily/beam.cc

index 3b35d30d11e04d4ffcccf71f4bda6b0692fbaa9c..17fe81e40c0e216018b2e13fc252fc66516ee93e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2005-08-24  Han-Wen Nienhuys  <hanwen@xs4all.nl>
 
+       * lily/beam.cc (print): fix X start/end points of isolated
+       beamlets.
+
        * scm/output-ps.scm (grob-cause): escape spaces in URLs.
 
        * lily/multi-measure-rest.cc (set_text_rods): new function.
index e0a5fe51c1e6bda1b7ba038c64008f8cd405fe1c..4ad02de78df99239c5ce2a9fb515ad96b94d854f 100644 (file)
@@ -280,8 +280,10 @@ Beam::connect_beams (Grob *me)
 }
 
 /*
-  TODO: should not make beams per stem, but per Y-level; probably when
-  someone wants to sponsor feathered beaming.
+  I really enjoy spaghetti, but spaghetti should be kept on a plate
+  with a little garlic and olive oil. This is too much.
+
+  rewrite-me
 */
 MAKE_SCHEME_CALLBACK (Beam, print, 1);
 SCM
@@ -454,19 +456,25 @@ Beam::print (SCM grob)
              - last_xposn
              + break_overshoot[RIGHT];
 
+         rw += stem_width / 2;
+         lw += last_stem_width / 2;
+
          Stencil rhalf = Lookup::beam (slope, rw, thick, blot);
          Stencil lhalf = Lookup::beam (slope, lw, thick, blot);
          for (int j = lfliebertjes.size (); j--;)
            {
              Stencil b (lhalf);
-             b.translate_axis (last_xposn - x0, X_AXIS);
-             b.translate_axis (slope * (last_xposn - x0) + bdy * lfliebertjes[j], Y_AXIS);
+             b.translate_axis (last_xposn - x0 - last_stem_width /2,
+                               X_AXIS);
+             b.translate_axis (slope * (last_xposn - x0)
+                               + bdy * lfliebertjes[j],
+                               Y_AXIS);
              the_beam.add_stencil (b);
            }
          for (int j = rfliebertjes.size (); j--;)
            {
              Stencil b (rhalf);
-             b.translate_axis (xposn - x0 - rw, X_AXIS);
+             b.translate_axis (xposn - x0 - rw + stem_width / 2, X_AXIS);
              b.translate_axis (slope * (xposn - x0 - rw)
                                + bdy * rfliebertjes[j], Y_AXIS);
              the_beam.add_stencil (b);
@@ -478,13 +486,14 @@ Beam::print (SCM grob)
       last_beaming = this_beaming;
     }
 
-  the_beam.translate_axis (x0 - me->relative_coordinate (xcommon, X_AXIS), X_AXIS);
+  the_beam.translate_axis (x0 - me->relative_coordinate (xcommon, X_AXIS),
+                          X_AXIS);
   the_beam.translate_axis (pos[LEFT], Y_AXIS);
 
 #if (DEBUG_QUANTING)
   SCM quant_score = me->get_property ("quant-score");
-  if (to_boolean (me->get_layout ()->lookup_variable (ly_symbol2scm ("debug-beam-quanting")))
-      && scm_is_string (quant_score))
+  SCM debug = me->get_layout ()->lookup_variable (ly_symbol2scm ("debug-beam-quanting"));
+  if (to_boolean (debug) && scm_is_string (quant_score))
     {
 
       /*