aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-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)))