From 4b306ee0db60ba9923ef86bd1ea74df8b53bbcbb Mon Sep 17 00:00:00 2001 From: Colin Okay Date: Tue, 19 Jul 2022 14:09:48 -0500 Subject: [fix] setting of pen function in canvas --- src/canvas-language.lisp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src') 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))) -- cgit v1.2.3