summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Thompson <dthompson2@worcester.edu>2021-09-07 20:11:37 -0400
committerDavid Thompson <dthompson2@worcester.edu>2021-09-08 07:24:43 -0400
commitde3be995ed26f9ea78f7462095919ba08df2cd25 (patch)
tree9e20e042b29ca69efc87040dbc41d662b1aa64f8
parent407711fecfc5f10fd5c04b248c994403e06698a9 (diff)
graphics: path: Use case instead of match for stroke cap matching.
-rw-r--r--chickadee/graphics/path.scm18
1 files 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))))))