diff --git a/examples/dune b/examples/dune index b828d8b..4029bf3 100644 --- a/examples/dune +++ b/examples/dune @@ -78,12 +78,17 @@ (modules rectangle) (libraries joy)) +(executable + (name rectangle_canvas) + (modules rectangle_canvas) + (libraries joy)) + (executable (name star) (modules star) (libraries joy)) - -(executable + +(executable (name repeat) (modules repeat) (libraries joy)) diff --git a/examples/rectangle_canvas.ml b/examples/rectangle_canvas.ml new file mode 100644 index 0000000..3fedbf5 --- /dev/null +++ b/examples/rectangle_canvas.ml @@ -0,0 +1,9 @@ +open Joy + +let () = + init ~size:(500., 300.) (); + background (1., 1., 1., 1.); + let c = circle 50. in + set_color (0., 0., 0.); + show [ c ]; + write ~filename:"rectangular_canvas.png" ()