[closure-cvs] CVS update: closure/src/renderer/clim-draw.lisp

Eric Marsden emarsden at common-lisp.net
Sun Mar 13 21:39:20 UTC 2005


Update of /project/closure/cvsroot/closure/src/renderer
In directory common-lisp.net:/tmp/cvs-serv25449/src/renderer

Modified Files:
	clim-draw.lisp 
Log Message:
 - Fix for CLX VALUE-ERRORs when drawing dashed lines with a dash distance
   of zero, in CLIM-DRAW-BORDER

Date: Sun Mar 13 22:39:19 2005
Author: emarsden

Index: closure/src/renderer/clim-draw.lisp
diff -u closure/src/renderer/clim-draw.lisp:1.2 closure/src/renderer/clim-draw.lisp:1.3
--- closure/src/renderer/clim-draw.lisp:1.2	Sun Mar 13 19:03:24 2005
+++ closure/src/renderer/clim-draw.lisp	Sun Mar 13 22:39:19 2005
@@ -4,7 +4,7 @@
 ;;;   Created: 2003-03-08
 ;;;    Author: Gilbert Baumann <gilbert at base-engineering.com>
 ;;;   License: MIT style (see below)
-;;;       $Id: clim-draw.lisp,v 1.2 2005/03/13 18:03:24 gbaumann Exp $
+;;;       $Id: clim-draw.lisp,v 1.3 2005/03/13 21:39:19 emarsden Exp $
 ;;; ---------------------------------------------------------------------------
 ;;;  (c) copyright 1997-2003 by Gilbert Baumann
 
@@ -66,6 +66,7 @@
                    (list x1 y1 x2 y2 x3 y3 x4 y4)
                    :filled t :ink ink))
                  ((:dotted)
+                  (let ((sw (max w 1)))
                     (clim:draw-line* medium
                      (/ (+ x1 x2) 2)
                      (/ (+ y1 y2) 2)
@@ -74,11 +75,10 @@
                      :ink ink
                      :line-thickness w
                      :line-cap-shape :round
-                     :line-dashes (vector w (* 3 w)))) 
+                     :line-dashes (vector sw (* 3 sw)))))
                  ((:dashed)
-                  ;; this triggers an CLX value-error
-                  #+NIL
-                  (clim:draw-line* medium
+                  (let ((sw (max 1 w)))
+                    (clim:draw-line* medium
                      (/ (+ x1 x2) 2)
                      (/ (+ y1 y2) 2)
                      (/ (+ x3 x4) 2)
@@ -86,7 +86,7 @@
                      :ink ink
                      :line-thickness w
                      :line-cap-shape :square
-                     :line-dashes (vector (* 3 w) (* 3 w)))) 
+                     :line-dashes (vector (* 3 sw) (* 3 sw)))))
                  ((:double)
                   (clim:draw-polygon* medium
                    (list x1 y1




More information about the Closure-cvs mailing list