[gsharp-cvs] CVS gsharp

rstrandh rstrandh at common-lisp.net
Wed Jan 25 00:50:56 UTC 2006


Update of /project/gsharp/cvsroot/gsharp
In directory common-lisp:/tmp/cvs-serv21207

Modified Files:
	drawing.lisp measure.lisp 
Log Message:
Fixed a problem that made zero-duration elements generate
zero-elasticity timelines, which is not acceptable.

Fixed a problem that messed up the timelines when there were two
consecutive zero-duration elements. 



--- /project/gsharp/cvsroot/gsharp/drawing.lisp	2006/01/21 23:39:16	1.56
+++ /project/gsharp/cvsroot/gsharp/drawing.lisp	2006/01/25 00:50:56	1.57
@@ -98,7 +98,7 @@
 		 for i from 0 below (flexichain:nb-elements timelines)
 		 for timeline = (flexichain:element* timelines i)
 		 do (setf (elasticity timeline)
-			  (expt (duration timeline) (spacing-style method))))))
+			  (max (expt (duration timeline) (spacing-style method)) 0.0001)))))
 
 ;;; FIXME: there should be an :around method that adds the value
 ;;; return by the main method to the explicit horizontal offset that
--- /project/gsharp/cvsroot/gsharp/measure.lisp	2006/01/22 20:38:52	1.24
+++ /project/gsharp/cvsroot/gsharp/measure.lisp	2006/01/25 00:50:56	1.25
@@ -649,7 +649,8 @@
 			   (flexichain:insert* timelines timeline-index timeline)))
 		    do (let ((timeline (flexichain:element* timelines timeline-index)))
 			 (push element (elements timeline))
-			 (setf (timeline element) timeline)))))
+			 (setf (timeline element) timeline)
+			 (incf timeline-index)))))
       (loop for bar in (measure-bars measure)
 	    do (compute-bar-timelines bar)))
     ;; compute the duration of each timeline except the last one




More information about the Gsharp-cvs mailing list