From 427385baab0e83c08313e7da9f9647269ba3126a Mon Sep 17 00:00:00 2001 From: Matthew Butterick Date: Sun, 14 May 2017 21:25:42 -0700 Subject: [PATCH] touch --- pitfall/pitfall/color.rkt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pitfall/pitfall/color.rkt b/pitfall/pitfall/color.rkt index ea7ec9ee..d03ee5f7 100644 --- a/pitfall/pitfall/color.rkt +++ b/pitfall/pitfall/color.rkt @@ -66,9 +66,9 @@ (send color apply op) #t] ; todo [else - (define color-space (cond - [(= (length color) 4) "DeviceCMYK"] - [(= (length color) 3) "DeviceRGB"] + (define color-space (case (length color) + [(4) "DeviceCMYK"] + [(3) "DeviceRGB"] [else (raise-argument-error '_setColor "color of length 3 or 4" color)])) (_setColorSpace this color-space stroke) (send this addContent (format "~a ~a" (string-join (map number color) " ") op))