[gsharp-cvs] CVS gsharp

rstrandh rstrandh at common-lisp.net
Tue Jun 13 01:18:10 UTC 2006


Update of /project/gsharp/cvsroot/gsharp
In directory clnet:/tmp/cvs-serv8603

Modified Files:
	drawing.lisp measure.lisp 
Log Message:
Fixed a bug in the page breaking algorithm that made the page way to
sparse.

Fixed a bug in the page layout algorithm that made Gsharp attempt to
divide the measures of a page into more lines than there are measures.



--- /project/gsharp/cvsroot/gsharp/drawing.lisp	2006/06/12 18:25:32	1.68
+++ /project/gsharp/cvsroot/gsharp/drawing.lisp	2006/06/13 01:18:10	1.69
@@ -421,7 +421,7 @@
 				(loop do (incf m)
 				      while (and (< minl minr)
 						 (< maxl maxr)
-						 (< m (- end start)))
+						 (>= (- end start m) (- n nn)))
 				      do (multiple-value-bind (left new-minl new-maxl)
 					     (split-aux sequence start (+ start m) nn)
 					   (multiple-value-bind (right new-minr new-maxr)
@@ -441,7 +441,7 @@
 				(loop do (decf m)
 				      while (and (> minl minr)
 						 (> maxl maxr)
-						 (> m 0))
+						 (>= m nn))
 				      do (multiple-value-bind (left new-minl new-maxl)
 					     (split-aux sequence start (+ start m) nn)
 					   (multiple-value-bind (right new-minr new-maxr)
--- /project/gsharp/cvsroot/gsharp/measure.lisp	2006/06/12 18:25:32	1.29
+++ /project/gsharp/cvsroot/gsharp/measure.lisp	2006/06/13 01:18:10	1.30
@@ -968,7 +968,7 @@
 (defmethod seq-cost-cannot-decrease ((method measure-cost-method)
 					    (seq-cost measure-seq-cost))
   (>= (natural-width method seq-cost)
-      (line-width method)))
+      (* (line-width method) (lines-per-page method))))
 
 ;;; Compare the cost of two sequences of measures
 (defmethod cost-less ((method measure-cost-method)




More information about the Gsharp-cvs mailing list