diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/canvas-language.lisp | 11 |
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)) |