diff options
author | Colin Okay <colin@cicadas.surf> | 2022-07-20 10:00:34 -0500 |
---|---|---|
committer | Colin Okay <colin@cicadas.surf> | 2022-07-20 10:00:34 -0500 |
commit | fdd4275c181fbf86c9cac01eb651fb6885cdf371 (patch) | |
tree | 711d2870fee30d20a7dd27fbff573ab553f9d29a /examples/12-canvas-drawing-language.lisp | |
parent | 1b5440df2b7dc87c1088fc3842195dbd576276ff (diff) |
[add] fill bezier. [example] tweaking
Diffstat (limited to 'examples/12-canvas-drawing-language.lisp')
-rw-r--r-- | examples/12-canvas-drawing-language.lisp | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/examples/12-canvas-drawing-language.lisp b/examples/12-canvas-drawing-language.lisp index bece8c8..b4a621b 100644 --- a/examples/12-canvas-drawing-language.lisp +++ b/examples/12-canvas-drawing-language.lisp @@ -62,14 +62,16 @@ ;; curve. the curve uses two control points that are R away from ;; the starting point and PSW radians on either side of the line ;; at angle a - (loop for a from 0 to (* 2 pi) by (/ (* 2 pi) petals) do - (ww::stroke-rel-bezier - (list (list (* r (sin (- a psw))) + (loop for a from 0 to (* 2 pi) by (/ (* 2 pi) petals) + for ls = (list (list (* r (sin (- a psw))) (* r (cos (- a psw)))) (list (* r (sin (+ a psw))) (* r (cos (+ a psw)))) (list 0 0)) - 12)))) + do + (ww::fill-rel-bezier ls 12) + (ww::with-pen (:color (list 0 0 0 255)) + (ww::stroke-rel-bezier ls 12))))) (defun draw-stuff (canvas) (ww::with-canvas canvas @@ -86,10 +88,6 @@ ;; draw a flower (flower 28)) - - - ;; draw a bunch of triangles - (ww::canvas-pen-width 1) (dotimes (x 50) (when (evenp x) (triangle-at 30 (+ 250 x)))))) |