From de3be995ed26f9ea78f7462095919ba08df2cd25 Mon Sep 17 00:00:00 2001 From: David Thompson Date: Tue, 7 Sep 2021 20:11:37 -0400 Subject: graphics: path: Use case instead of match for stroke cap matching. --- chickadee/graphics/path.scm | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/chickadee/graphics/path.scm b/chickadee/graphics/path.scm index 8f21394..24796a7 100644 --- a/chickadee/graphics/path.scm +++ b/chickadee/graphics/path.scm @@ -1171,14 +1171,16 @@ #:mvp mvp #:color (stroked-path-color stroked-path) #:feather (stroked-path-feather stroked-path) - #:stroke-cap (match (stroked-path-cap stroked-path) - (#f 0) ; no cap - ('butt 1) - ('square 2) - ('round 3) - ('triangle-out 4) - ('triangle-in 5) - (x (error "unsupported line cap style" x))) + #:stroke-cap (case (stroked-path-cap stroked-path) + ((#f) 0) ; no cap + ((butt) 1) + ((square) 2) + ((round) 3) + ((triangle-out) 4) + ((triangle-in) 5) + (else + (error "unsupported line cap style" + (stroked-path-cap stroked-path)))) #:stroke-width (stroked-path-width stroked-path)))))) -- cgit v1.2.3