Hi,
I've been perusing the Quil examples and other messages to this group for examples of using Quil in a pure batch-oriented (command line) style. This may be a misuse of Quil (and Processing) so any advice would be very welcome.
Essentially I'd like to create a large number of smallish Quil server-side renderings to PDF and PNG files without creating or referencing a GUI window or applet or frame etc. I'm starting to realize that may mean my sketch function cannot have a :draw function as that seems to create a frame.
I'm trying something like this:
(defn render []
(let [graphics (create-graphics 1500 1000 :pdf "/tmp/foo.pdf")]
(.beginDraw graphics)
(smooth)
(background 255)
(ellipse 100 100 200 200)
(.endDraw graphics)))
(defn graphics []
(sketch
:title "my title"
:setup render))
With the PDF graphics I'm ending up with a zero-byte PDF file and with the :java2D graphics I'm getting crashes or GUI windows popping up. I'm using .beginDraw and .endDraw as my test code (run from the REPL) complains about not seeing the with-graphics macro. I'm almost certainly missing something important here, particularly with handling the graphics context and ending the process and writing the graphics file.
Any advice much appreciated,
Thanks,
Stu