]> git.donarmstrong.com Git - lilypond.git/commitdiff
patch::: 1.3.112.jcn2
authorJan Nieuwenhuizen <janneke@gnu.org>
Wed, 29 Nov 2000 13:42:49 +0000 (14:42 +0100)
committerJan Nieuwenhuizen <janneke@gnu.org>
Wed, 29 Nov 2000 13:42:49 +0000 (14:42 +0100)
1.3.112.jcn2
============

* Fixed stem-tremolo (caching problem).

CHANGES
VERSION
lily/include/stem-tremolo.hh
lily/stem-tremolo.cc
scm/beam.scm
scm/element-descriptions.scm
scm/slur.scm

diff --git a/CHANGES b/CHANGES
index 3ca97f927a7ed8bc00c6fc2ac57fffc46ebe0c85..f1dbe42f42efba8afe0384163063eafc43748543 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,8 @@
+1.3.112.jcn2
+============
+
+* Fixed stem-tremolo (caching problem).
+
 1.3.112.jcn1
 ============
 
diff --git a/VERSION b/VERSION
index 7cadd3f2ddefa05488007ec05d5a3e38013b2aab..97c76d3de2609b7b5ad3b6b6434c4049c34e52d2 100644 (file)
--- a/VERSION
+++ b/VERSION
@@ -2,7 +2,7 @@ PACKAGE_NAME=LilyPond
 MAJOR_VERSION=1
 MINOR_VERSION=3
 PATCH_LEVEL=112
-MY_PATCH_LEVEL=jcn1
+MY_PATCH_LEVEL=jcn2
 
 # use the above to send patches: MY_PATCH_LEVEL is always empty for a
 # released version.
index e093b3a49734ebd66907b65fea1aa9405f9e4af8..adfdf739d11805fe97cc995581e54ab3c8df60ce 100644 (file)
@@ -18,8 +18,9 @@ class Stem_tremolo
 public:
   static void set_interface (Grob*);
   static bool has_interface (Grob*);
-  DECLARE_SCHEME_CALLBACK(dim_callback, (SCM smob, SCM axis));
-  DECLARE_SCHEME_CALLBACK(brew_molecule, (SCM ));
+  DECLARE_SCHEME_CALLBACK (dim_callback, (SCM smob, SCM axis));
+  DECLARE_SCHEME_CALLBACK (brew_molecule, (SCM ));
+  DECLARE_SCHEME_CALLBACK (height, (SCM,SCM));
   static void set_stem (Grob*me, Grob *st);
 };
 
index 689d24e71f215bf50f09f2ff8512496c5ae203d9..36cbc63f97f4cbb6eea3eeb1f3838b462ae101c7 100644 (file)
@@ -48,6 +48,20 @@ Stem_tremolo::dim_callback (SCM e, SCM )
   return ly_interval2scm ( Interval (-space, space));
 }
 
+/*
+  ugh ?  --from Slur
+ */
+MAKE_SCHEME_CALLBACK (Stem_tremolo, height, 2);
+SCM
+Stem_tremolo::height (SCM smob, SCM ax)
+{
+  Axis a = (Axis)gh_scm2int (ax);
+  Grob * me = unsmob_grob (smob);
+  assert ( a == Y_AXIS);
+
+  SCM mol = me->get_uncached_molecule ();
+  return ly_interval2scm (unsmob_molecule (mol)->extent (a));
+}
 
 
 MAKE_SCHEME_CALLBACK(Stem_tremolo,brew_molecule,1);
index 9e7005e31f0c3013c78ae6d4d7b8cf8ed72794e4..8ae7f3004472b6ea86acaa7eefff4a10954e2513 100644 (file)
 ;;  - take #forced stems into account (now done in C++)?
 ;;  - take y-position of chord or beam into account
 
-;
-; todo: clean this up a bit: the list is getting rather long.
-; 
-(define basic-beam-properties
-  `(
-    (molecule-callback . ,Beam::brew_molecule)
-    (thickness . 0.42) ; in staff-space, should use stafflinethick?
-    (before-line-breaking-callback . ,Beam::before_line_breaking)
-    (after-line-breaking-callback . ,Beam::after_line_breaking)
-    (default-neutral-direction . 1)
-    (dir-function . ,beam-dir-majority)
-    (height-quants .  ,default-beam-dy-quants)
-    (vertical-position-quant-function . ,default-beam-y-quants)
-    (beamed-stem-shorten . (0.5))
-    (outer-stem-length-limit . 0.2)
-    (slope-limit . 0.2)
-    (flag-width-function . ,default-beam-flag-width-function)
-    (space-function . ,default-beam-space-function)
-    (damping . 1)
-    (meta . ,(element-description "Beam" beam-interface))
-    )
-  )
-
index f656d5b1971389392db50511426763e2bc94dbcd..15e9b9ff67eeeb270ed722af769c89badc052cf2 100644 (file)
                        text-interface  font-interface break-aligned-interface))
        ))
 
-       (Beam . ,basic-beam-properties)
+       (Beam . (
+                ;; todo: clean this up a bit: the list is getting
+                ;; rather long.
+                (molecule-callback . ,Beam::brew_molecule)
+                (thickness . 0.42) ; in staff-space, should use stafflinethick?
+                (before-line-breaking-callback . ,Beam::before_line_breaking)
+                (after-line-breaking-callback . ,Beam::after_line_breaking)
+                (default-neutral-direction . 1)
+                (dir-function . ,beam-dir-majority)
+                (height-quants .  ,default-beam-dy-quants)
+                (vertical-position-quant-function . ,default-beam-y-quants)
+                (beamed-stem-shorten . (0.5))
+                (outer-stem-length-limit . 0.2)
+                (slope-limit . 0.2)
+                (flag-width-function . ,default-beam-flag-width-function)
+                (space-function . ,default-beam-space-function)
+                (damping . 1)
+                (meta . ,(element-description "Beam" beam-interface))
+                ))
         
        (BreakAlignment . (
                (breakable . #t)
                (meta . ,(element-description "ScriptColumn" script-column-interface))
        ))
        
-       (Slur . ,default-basic-slur-properties)
+       (Slur . (
+                (molecule-callback . ,Slur::brew_molecule)
+                (thickness . 1.2)              
+                (spacing-procedure . ,Slur::set_spacing_rods)          
+                (minimum-length . 1.5)
+                (after-line-breaking-callback . ,Slur::after_line_breaking)
+                (extremity-rules . ,default-slur-extremity-rules)
+                (extremity-offset-alist . ,default-slur-extremity-offset-alist)
+                (de-uglify-parameters . ( 1.5  0.8  -2.0))
+                (Y-extent-callback . ,Slur::height)
+                (details . ((height-limit . 2.0) (ratio . 0.333) (force-blowfit . 0.5)
+                            (bezier-pct-c0 . -0.2) (bezier-pct-c3 . 0.000006)
+                            (bezier-pct-out-max . 0.8) (bezier-pct-in-max . 1.2)
+                            (bezier-area-steps . 1.0)))
+                (beautiful . 0.5)
+                (y-free . 0.75)
+                (attachment-offset . ((0 . 0) . (0 . 0)))
+                (slope-limit . 0.8)
+                (meta . ,(element-description "Slur" slur-interface))
+                ))
+             
        (SpacingSpanner . (
                (spacing-procedure . ,Spacing_spanner::set_springs)
                (stem-spacing-correction . 0.5)
 
        (StemTremolo . (
                (molecule-callback . ,Stem_tremolo::brew_molecule)
+               (Y-extent-callback . ,Stem_tremolo::height)
+               (X-extent-callback . #f)
+
                (beam-width . 2.0) ; staff-space
                (beam-thickness . 0.42) ; staff-space
                (beam-space-function . ,default-beam-space-function)
index a91bc2f04e88fd745683d0c27b3ba54d64bd5005..02e4642f0eeb932b8c4a16a52cc1c7d47fd9de51 100644 (file)
     ))
 
 
-(define default-basic-slur-properties
-  `(
-   (molecule-callback . ,Slur::brew_molecule)
-   (thickness . 1.2)           
-   (spacing-procedure . ,Slur::set_spacing_rods)               
-   (minimum-length . 1.5)
-   (after-line-breaking-callback . ,Slur::after_line_breaking)
-   (extremity-rules . ,default-slur-extremity-rules)
-   (extremity-offset-alist . ,default-slur-extremity-offset-alist)
-   (de-uglify-parameters . ( 1.5  0.8  -2.0))
-   (Y-extent-callback . ,Slur::height)
-   (details . ((height-limit . 2.0) (ratio . 0.333) (force-blowfit . 0.5)
-       (bezier-pct-c0 . -0.2) (bezier-pct-c3 . 0.000006)
-       (bezier-pct-out-max . 0.8) (bezier-pct-in-max . 1.2)
-       (bezier-area-steps . 1.0)))
-   (beautiful . 0.5)
-   (y-free . 0.75)
-   (attachment-offset . ((0 . 0) . (0 . 0)))
-   (slope-limit . 0.8)
-   (meta . ,(element-description "Slur" slur-interface))
-   )
-  )