]> git.donarmstrong.com Git - lilypond.git/commitdiff
patch::: 1.3.133.jcn3
authorJan Nieuwenhuizen <janneke@gnu.org>
Wed, 28 Feb 2001 19:11:48 +0000 (20:11 +0100)
committerJan Nieuwenhuizen <janneke@gnu.org>
Wed, 28 Feb 2001 19:11:48 +0000 (20:11 +0100)
1.3.133.jcn3
============

* Small ez play tweaks.  Guess I'm a sucker too.

*

CHANGES
VERSION
lily/line-of-score.cc
ps/lily.ps
scm/grob-description.scm
scm/grob-property-description.scm

diff --git a/CHANGES b/CHANGES
index b3416049fd473016336bede5db2c2b0175e2cd57..a5127e2557b040e9e0c8e7c9f7765ddf5e3e96c8 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,10 @@
+1.3.133.jcn3
+============
+
+* Small ez play tweaks.  Guess I'm a sucker too.
+
+* 
+
 1.3.133.jcn2
 ============
 
diff --git a/VERSION b/VERSION
index 67f82fc622033f0d8eb78a4ab4270930e35e8931..deaf83e0fe13cc993d0ee72da6820ba9e6b874e6 100644 (file)
--- a/VERSION
+++ b/VERSION
@@ -2,7 +2,7 @@ PACKAGE_NAME=LilyPond
 MAJOR_VERSION=1
 MINOR_VERSION=3
 PATCH_LEVEL=133
-MY_PATCH_LEVEL=jcn2
+MY_PATCH_LEVEL=jcn3
 
 # use the above to send patches: MY_PATCH_LEVEL is always empty for a
 # released version.
index 924b2c9ec4c793e87e806d920c61175d0a6b1cd1..c662d33599fedce4bc4c97e180e740d42e63ae8f 100644 (file)
@@ -321,38 +321,35 @@ Line_of_score::post_processing (bool last_line)
                          gh_double2scm (height),
                          SCM_UNDEFINED));
   
-  /*
-    all elements.
-   */
-#if 0
-  for (SCM s = get_grob_property ("all-elements"); gh_pair_p (s); s = gh_cdr (s))
-#else
-    /*
-      Output the staff-symbol (the last element in this list) first,
-      this fixes easy-play.
-      Maybe scm_reverse () is too inefficient, we could cache/remove
-      last element from list traversal above.
-     */
-  for (SCM s = scm_reverse (get_grob_property ("all-elements")); gh_pair_p (s); s = gh_cdr (s))
-#endif
-    {
-      Grob *sc = unsmob_grob (gh_car (s));
-      Molecule *m = sc->get_molecule ();
-      if (!m)
-       continue;
-      
-      Offset o (sc->relative_coordinate (this, X_AXIS),
-               sc->relative_coordinate (this, Y_AXIS));
-
-      SCM e = sc->get_grob_property ("extra-offset");
-      if (gh_pair_p (e))
-       {
-         o[X_AXIS] += gh_scm2double (gh_car (e));
-         o[Y_AXIS] += gh_scm2double (gh_cdr (e));      
-       }
-
-      output_molecule (m->get_expr (), o);
-    }
+  /* Output elements in three layers, 0, 1, 2.
+     The default layer is 1. */
+  for (int i = 0; i < 3; i++)
+    for (SCM s = get_grob_property ("all-elements"); gh_pair_p (s);
+        s = gh_cdr (s))
+      {
+       Grob *sc = unsmob_grob (gh_car (s));
+       Molecule *m = sc->get_molecule ();
+       if (!m)
+         continue;
+       
+       SCM s = sc->get_grob_property ("layer");
+       int layer = gh_number_p (s) ? gh_scm2int (s) : 1;
+       if (layer != i)
+         continue;
+       
+       Offset o (sc->relative_coordinate (this, X_AXIS),
+                 sc->relative_coordinate (this, Y_AXIS));
+       
+       SCM e = sc->get_grob_property ("extra-offset");
+       if (gh_pair_p (e))
+         {
+           o[X_AXIS] += gh_scm2double (gh_car (e));
+           o[Y_AXIS] += gh_scm2double (gh_cdr (e));      
+         }
+       
+       output_molecule (m->get_expr (), o);
+      }
+  
   if (last_line)
     {
       output_scheme (gh_list (ly_symbol2scm ("stop-last-line"), SCM_UNDEFINED));
index 5956635e65a84257bf09f92c1653d846e39c0925..de0f845dd0f4d0d579ebbf49aac907269225b088 100644 (file)
@@ -77,7 +77,7 @@
        stroke 
 } bind def 
 
-/draw_ez_ball % ch letter_col ball_col font
+/difficult_draw_ez_ball % ch letter_col ball_col font
 {
        % font
        findfont 0.7 scalefont setfont 
        show
 } bind def
 
+% simple, but does it work everywhere?
+/draw_ez_ball % ch letter_col ball_col font
+{
+       % font
+       findfont 0.85 scalefont setfont
+       /origin { 0.45 0 } def
+       0 setgray
+       1.1 setlinewidth
+       origin moveto
+       origin lineto stroke
+       % ball_col
+       setgray
+       0.9 setlinewidth
+       origin moveto
+       origin lineto stroke
+       % letter_col
+       setgray
+       % 0.25 is empiric centering. Change to taste
+       origin moveto
+       -0.28 -0.30 rmoveto
+       % ch
+       show
+} bind def
+
 /draw_volta % h w thick vert_start vert_end 
 { 
        /vert_end exch def 
index f9bbfab167689e876fa294f2f46887cef67f4173..c7fd1745b03b582aa2179d0b434733b35b66e827 100644 (file)
        (StaffSymbol . (
                (molecule-callback . ,Staff_symbol::brew_molecule)
                (staff-space . 1.0)
-               (line-count . 5 )
+               (line-count . 5)
+               (layer . 0)
                (meta . ,(grob-description "StaffSymbol" staff-symbol-interface ))
        ))
        (SostenutoPedal . (
index 0430b0f73e582db87e768f4973c05c8edaf9fdde..1305a01d21aa75acbacf39681476821833f77806 100644 (file)
@@ -179,6 +179,7 @@ FIXME: in Tie this is a pair of grob pointers, pointing to the two heads of the
 For text,  this is `relative'(?) to the current alignment.
 
 For barline, space after a thick line.")
+(grob-property-description 'layer number? "The output layer [0..2].  The default is 1.")
 (grob-property-description 'left-padding number? "space left of accs.")
 (grob-property-description 'length number? "Stem length for unbeamed stems, only for user override.")
 (grob-property-description 'lengths list? "Stem length given multiplicity of flag.")