aboutsummaryrefslogtreecommitdiffhomepage
path: root/examples/11-canvas-geometry.lisp
diff options
context:
space:
mode:
Diffstat (limited to 'examples/11-canvas-geometry.lisp')
-rw-r--r--examples/11-canvas-geometry.lisp19
1 files changed, 9 insertions, 10 deletions
diff --git a/examples/11-canvas-geometry.lisp b/examples/11-canvas-geometry.lisp
index e36df6e..bfc41f7 100644
--- a/examples/11-canvas-geometry.lisp
+++ b/examples/11-canvas-geometry.lisp
@@ -45,7 +45,7 @@
g (mod (* x x) 256)
b (mod (* y x) 256)))))
- ;; draw a random pentagonal thing
+ ;; draw a random thing
(let ((path
(loop repeat 7
collect (list (+ 10 (random 240))
@@ -56,16 +56,15 @@
g (mod (* 3 x) 256)
b (mod (* x y) 256)))))
- (let ((path
- (loop repeat 20
- collect (list (+ 10 (random 200))
- (+ 260 (random 200))))))
- (ww::with-grid-path (x y) (path :autoclosep t)
+ (let ((control-points
+ '((10 490)
+ (400 400)
+ (0 400)
+ (40 250))))
+ (ww::with-grid-bezier (x y) (control-points :step 0.001)
(ww::with-pixel (r g b a) (ww::pixel canvas x y)
- (setf r (mod (* 2 y) 256)
- g (mod (* 3 x) 256)
- b (mod (* x y) 256)))))
-
+ (ww::setf-many r g b a 255))))
+
;; blit the canvas
(ww::blit canvas)