I'm trying to generate a bunch of images programmatically with Quil without drawing to the screen (which may be crazy and feel free to tell me so).
The following snippet works just handily:
(defn setup []
(let [my-image (q/create-image 200 200 :argb)]
(q/text-align :center :center)
(q/text "and again?" 100 100)
(q/save "resources/images/test.png")))
(q/defsketch my-sketch
:bgcolor "#DDDDDD"
:title "boss title"
:setup setup
:size [200 200])
But this does not:
(defn setup []
(let [my-graphics (q/create-graphics 200 200 :argb)]
(q/with-graphics
(q/text-align :center :center)
(q/text "how about now?" 100 100)
(q/save "resources/images/test.png"))))
(q/defsketch my-sketch
:bgcolor "#DDDDDD"
:title "boss title"
:setup setup
:size [200 200])
Any thoughts?
--bv