aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/canvas-language.lisp
diff options
context:
space:
mode:
Diffstat (limited to 'src/canvas-language.lisp')
-rw-r--r--src/canvas-language.lisp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/canvas-language.lisp b/src/canvas-language.lisp
index 610c8e0..05cddfd 100644
--- a/src/canvas-language.lisp
+++ b/src/canvas-language.lisp
@@ -196,3 +196,14 @@ saved by WITH-PEN-STATE"
(stroke-bezier (cons *current-pen-position*
(rel-to-current-pos rel-control-points))
curve-samples))
+
+(defun fill-bezier (control-pts &optional (curve-samples 10))
+ (let (path)
+ (with-grid-bezier (x y) (control-pts :count curve-samples)
+ (push (list x y) path))
+ (fill-path (reverse path))))
+
+(defun fill-rel-bezier (rel-control-points &optional (curve-samples 10))
+ (fill-bezier (cons *current-pen-position*
+ (rel-to-current-pos rel-control-points))
+ curve-samples))