diff options
author | Colin Okay <colin@cicadas.surf> | 2022-07-19 14:09:48 -0500 |
---|---|---|
committer | Colin Okay <colin@cicadas.surf> | 2022-07-19 14:09:48 -0500 |
commit | 4b306ee0db60ba9923ef86bd1ea74df8b53bbcbb (patch) | |
tree | 6bdb4cb3310b8b7dd2fc208e4edd7b52982d8bc6 /src/canvas-language.lisp | |
parent | 3f2aadf1bd5579d192612a49bb51b2a0d2194a5a (diff) |
[fix] setting of pen function in canvas
Diffstat (limited to 'src/canvas-language.lisp')
-rw-r--r-- | src/canvas-language.lisp | 7 |
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))) |