]> git.donarmstrong.com Git - lilypond.git/commitdiff
patch::: 1.4.2.jcn4
authorJan Nieuwenhuizen <janneke@gnu.org>
Fri, 8 Jun 2001 21:23:34 +0000 (23:23 +0200)
committerJan Nieuwenhuizen <janneke@gnu.org>
Fri, 8 Jun 2001 21:23:34 +0000 (23:23 +0200)
1.4.2.jcn4

CHANGES
Documentation/topdocs/INSTALL.texi
VERSION
input/regression/easy-notation.ly
lily/include/note-head.hh
lily/note-head.cc

diff --git a/CHANGES b/CHANGES
index aed14109108d0bdcbf7752731b71f3e887660fc3..bdb011f50e3c1af9fc676b4a6741a0a3fefe734e 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,8 @@
-1.4.2.jcn3
+1.4.2.jcn4
 ==========
 
+* Bugfix: ledger lines on easy-notation note heads.
+
 * Windows: bugfix for tex-wrappers, added tex wrapper for dvips.
 LilyPond (read: ly2dvi) should now work right out of the box.
 
index 623ece58d5481fb86a28de994344d48cff72260c..5265baa0682201f92aab59233432c428ea9da626 100644 (file)
@@ -55,7 +55,8 @@ Binaries are available, but are not updated for every version released.
 @item @uref{ftp://ftp.cs.uu.nl/pub/GNU/LilyPond/binaries/RedHat/RPMS/, Red Hat i386}
 @item @uref{ftp://ftp.lilypond.org/pub/LilyPond/binaries/linuxppc/, LinuxPPC}
 @item @uref{ftp://ftp.debian.org/debian/pool/main/l/lilypond/, Debian GNU/Linux}
-@item @uref{http://home.austin.rr.com/jbr/jeff/lilypond/, Windows Stable}
+@item
+@c  @uref{http://home.austin.rr.com/jbr/jeff/lilypond/, Windows Stable}
 @c @item @uref{ftp://ftp.lilypond.org/pub/lilypond/gnu-windows, Windows
 @c Testing} 
 @uref{http://www.lilypond.org/gnu-windows/, Windows Testing}
diff --git a/VERSION b/VERSION
index e1a008903362aba2ba9f4584735648babe6a1e43..1ce83b95572a3ad0b32ac632b341e52f6d0551de 100644 (file)
--- a/VERSION
+++ b/VERSION
@@ -2,7 +2,7 @@ PACKAGE_NAME=LilyPond
 MAJOR_VERSION=1
 MINOR_VERSION=4
 PATCH_LEVEL=2
-MY_PATCH_LEVEL=jcn3
+MY_PATCH_LEVEL=jcn4
 
 # use the above to send patches: MY_PATCH_LEVEL is always empty for a
 # released version.
index 348aff0cbe050f8bfb25239a73c8b44355043f42..42a6f8edabe9fc6533fd940b29c7ee76ca18a3b2 100644 (file)
@@ -1,13 +1,14 @@
 \version "1.3.146"
 
 \header {
-texidoc  = " Ez-notation prints names in note heads."
+texidoc  = " Ez-notation prints names in note heads.
+You also get ledger lines, of course."
 }
 
 \include "paper26.ly"
 \paper { \paperTwentysix }
 
 \score {
-        \notes { c'2 e'4 f' | g'1 }
+        \notes { c'2 e'4 f' | g'1 b8 }
         \paper { \translator { \EasyNotation } } 
 }
index 833a86f6ac84b7ba3d805e72f773bc9c9cc59415..f44eba230e563f8d72a82b858a04ac512e4fd2f0 100644 (file)
@@ -21,6 +21,7 @@ class Note_head
 {
 public:
   DECLARE_SCHEME_CALLBACK (brew_molecule, (SCM ));
+  static Molecule ledger_lines (Grob*,int,Direction,Interval);
   static Molecule ledger_line (Interval, Grob*) ;
   DECLARE_SCHEME_CALLBACK (brew_ez_molecule, (SCM ));
   static bool has_interface (Grob*);
index 37b75e13a67db63e7ad2832c89730009039c0db5..f7ef57ecc94a74e3b710b821e012447c0e4e2ad0 100644 (file)
@@ -51,6 +51,29 @@ Note_head::ledger_line (Interval xwid, Grob *me)
 }
 
 
+Molecule
+Note_head::ledger_lines (Grob*me, int count, Direction dir, Interval idw)
+{
+  Real inter_f = Staff_symbol_referencer::staff_space (me)/2;
+  Molecule ledger (ledger_line (idw, me));
+
+  ledger.set_empty (true);
+  Real offs = (Staff_symbol_referencer::on_staffline (me))
+    ? 0.0
+    : -dir * inter_f;
+
+  Molecule legs;
+  for (int i=0; i < count; i++)
+    {
+      Molecule s (ledger);
+      s.translate_axis (-dir * inter_f * i*2 + offs,
+                       Y_AXIS);
+      legs.add_molecule (s);
+    }
+
+  return legs;
+}
+
 MAKE_SCHEME_CALLBACK (Note_head,brew_molecule,1);
 
 SCM
@@ -58,8 +81,6 @@ Note_head::brew_molecule (SCM smob)
 {
   Grob *me = unsmob_grob (smob);
 
-  
-  Real inter_f = Staff_symbol_referencer::staff_space (me)/2;
   int sz = Staff_symbol_referencer::line_count (me)-1;
   int p = (int)  rint (Staff_symbol_referencer::position_f (me));
   int streepjes_i = abs (p) < sz 
@@ -89,23 +110,11 @@ Note_head::brew_molecule (SCM smob)
       Direction dir = (Direction)sign (p);
       Interval hd = out.extent (X_AXIS);
       Real hw = hd.length ()/4;
-      Molecule ledger (ledger_line (Interval (hd[LEFT] - hw,
-                                              hd[RIGHT] + hw), me));
-      
-
-      ledger.set_empty (true);
-      Real offs = (Staff_symbol_referencer::on_staffline (me))
-       ? 0.0
-       : -dir * inter_f;
-
-      for (int i=0; i < streepjes_i; i++)
-       {
-         Molecule s (ledger);
-         s.translate_axis (-dir * inter_f * i*2 + offs,
-                           Y_AXIS);
-         out.add_molecule (s);
-       }
+      out.add_molecule (ledger_lines (me, streepjes_i, dir,
+                                     Interval (hd[LEFT] - hw,
+                                               hd[RIGHT] + hw)));
     }
+  
   return out.smobbed_copy ();
 }
 
@@ -132,7 +141,23 @@ Note_head::brew_ez_molecule (SCM smob)
                    SCM_UNDEFINED);
   Box bx (Interval (0, 1.0), Interval (-0.5, 0.5));
   Molecule m (bx, at);
+  int p = (int)  rint (Staff_symbol_referencer::position_f (me));
 
+  int sz = Staff_symbol_referencer::line_count (me)-1;
+  int streepjes_i = abs (p) < sz 
+    ? 0
+    : (abs (p) - sz) /2;
+
+ if (streepjes_i)
+   {
+      Direction dir = (Direction)sign (p);
+      Interval hd = m.extent (X_AXIS);
+      Real hw = hd.length ()/4;
+      m.add_molecule (ledger_lines (me, streepjes_i, dir,
+                                     Interval (hd[LEFT] - hw,
+                                               hd[RIGHT] + hw)));
+    }
+  
   return m.smobbed_copy ();
 }