summaryrefslogtreecommitdiff
path: root/chickadee
diff options
context:
space:
mode:
Diffstat (limited to 'chickadee')
-rw-r--r--chickadee/graphics/path.scm12
1 files changed, 12 insertions, 0 deletions
diff --git a/chickadee/graphics/path.scm b/chickadee/graphics/path.scm
index 27eb0b1..c4e2b89 100644
--- a/chickadee/graphics/path.scm
+++ b/chickadee/graphics/path.scm
@@ -56,6 +56,7 @@
arc-to
line
polyline
+ bezier-path
rectangle
square
rounded-rectangle
@@ -361,6 +362,17 @@
(line-to p2)
(map line-to prest)))
+(define (bezier-path p1 c1 c2 p2 . points)
+ (apply path
+ (move-to p1)
+ (bezier-to c1 c2 p2)
+ (let loop ((points points))
+ (match points
+ (() '())
+ ((c1 c2 p . rest)
+ (cons (bezier-to c1 c2 p)
+ (loop rest)))))))
+
(define (rectangle bottom-left width height)
(let ((x (vec2-x bottom-left))
(y (vec2-y bottom-left)))