aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/canvas-language.lisp
diff options
context:
space:
mode:
authorColin Okay <colin@cicadas.surf>2022-07-19 14:09:48 -0500
committerColin Okay <colin@cicadas.surf>2022-07-19 14:09:48 -0500
commit4b306ee0db60ba9923ef86bd1ea74df8b53bbcbb (patch)
tree6bdb4cb3310b8b7dd2fc208e4edd7b52982d8bc6 /src/canvas-language.lisp
parent3f2aadf1bd5579d192612a49bb51b2a0d2194a5a (diff)
[fix] setting of pen function in canvas
Diffstat (limited to 'src/canvas-language.lisp')
-rw-r--r--src/canvas-language.lisp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/canvas-language.lisp b/src/canvas-language.lisp
index b77ad02..6583fc8 100644
--- a/src/canvas-language.lisp
+++ b/src/canvas-language.lisp
@@ -27,10 +27,11 @@
(defun canvas-pen-color (r g b a)
(setf *current-pen-color* (mapcar #'colfix (list r g b a))))
-(defun canvas-pen-color-function (fn)
+(defun canvas-pen-color-function (&optional fn)
(setf *current-pen-color-function*
- (lambda (x y)
- (mapcar #'colfix (funcall fn x y)))))
+ (when fn
+ (lambda (x y)
+ (mapcar #'colfix (funcall fn x y))))))
(defun canvas-pen-width (n)
(setf *current-pen-width* (round n)))