From: Han-Wen Nienhuys <hanwen@xs4all.nl>
Date: Wed, 29 Sep 2004 22:42:03 +0000 (+0000)
Subject: * lily/slur.cc (outside_slur_callback): epsilon-delta management
X-Git-Tag: release/2.3.20~15
X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=83e740f16056b4986b47d44fc2042519064e15eb;p=lilypond.git

* lily/slur.cc (outside_slur_callback): epsilon-delta management
for slur edges.

* scm/framework-tex.scm (dump-page): put stencil height in dumped
page.
---

diff --git a/ChangeLog b/ChangeLog
index e0c230bc9e..feeb553770 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2004-09-30  Han-Wen Nienhuys   <hanwen@xs4all.nl>
 
+	* lily/slur.cc (outside_slur_callback): epsilon-delta management
+	for slur edges.
+ 
 	* scm/framework-tex.scm (dump-page): put stencil height in dumped
 	page.
 
diff --git a/lily/slur.cc b/lily/slur.cc
index 7be89976d8..2f83d045a3 100644
--- a/lily/slur.cc
+++ b/lily/slur.cc
@@ -169,8 +169,14 @@ Slur::outside_slur_callback (SCM grob, SCM axis)
   
   if (!bezext.contains (x))
     return scm_make_real (0);
-
-  Real y = curve.get_other_coordinate (X_AXIS, x);
+  Real dist = fabs (x - bezext[LEFT]) <? fabs (x - bezext[RIGHT]);
+  
+  Real y = (dist >  1e-3)
+    ? curve.get_other_coordinate (X_AXIS, x)
+    : ((x < bezext.center())
+       ? curve.control_[0][Y_AXIS]
+       : curve.control_[3][Y_AXIS]);
+       
   if (yext.contains (y)) 
     {
       Direction dir = get_grob_direction (script); 
diff --git a/scm/framework-tex.scm b/scm/framework-tex.scm
index d27785d75c..98dc39fc38 100644
--- a/scm/framework-tex.scm
+++ b/scm/framework-tex.scm
@@ -172,8 +172,8 @@
   (ly:outputter-dump-string
    putter
    (if last?
-       "}\\vss\n}\n\\vfill\n"
-       "}\\vss\n}\n\\vfill\\lilypondpagebreak\n")))
+       "}\\vss\n}\n\\vss\n"
+       "}\\vss\n}\n\\vss\\lilypondpagebreak\n")))
 
 (define-public (output-framework outputter book scopes fields basename )
   (let* ((bookpaper (ly:paper-book-book-paper book))