diff options
Diffstat (limited to 'examples')
-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)))))) |