diff --git a/examples/basics/shapes.lisp b/examples/basics/shapes.lisp index c80fa98..adecf1a 100644 --- a/examples/basics/shapes.lisp +++ b/examples/basics/shapes.lisp @@ -1,5 +1,5 @@ +; shapes (clear) -; stroke rect (stroke (rect 0 0 300 300) "red") (stroke @@ -19,7 +19,7 @@ (pos 300 300) (pos 600 0) (pos 600 300)) "red") -(move 0 300) +(transform:move 0 300) (fill (rect 0 0 300 300) "red") (fill @@ -39,4 +39,4 @@ (pos 300 300) (pos 600 0) (pos 600 300)) "red") -(resetTransform) \ No newline at end of file +(transform:reset) diff --git a/examples/basics/transforms.lisp b/examples/basics/transforms.lisp new file mode 100644 index 0000000..a83c1b1 --- /dev/null +++ b/examples/basics/transforms.lisp @@ -0,0 +1,21 @@ +; transforms +(clear) +(def f + (frame)) +(transform:move 150 150) +(fill + (circle 0 0 150) "#ffb545") +(transform:move 300 0) +(transform:rotate + (rad 90)) +(fill + (circle 0 0 150) "white") +(transform:move 300 0) +(transform:rotate + (rad 90)) +(fill + (circle 0 0 150) "#72dec2") +(transform:move 300 0) +(fill + (circle 0 0 150) "#555") +(transform:reset) \ No newline at end of file