--
You received this message because you are subscribed to the Google Groups "clj-processing" group.
To unsubscribe from this group and stop receiving emails from it, send an email to clj-processin...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/clj-processing/5a97baac-01a4-4232-8e9c-0d59f8e5e6f6%40googlegroups.com.
:mouse-clicked (fn [state _] (let [dt (.format (java.text.SimpleDateFormat. "yyyy-MM-dd-hhmmss") (new java.util.Date)) nm (str "connected_squares_" dt ".pdf")] (q/do-record (q/create-graphics W H :pdf nm) (q/color-mode :hsb 360 100 100 1) (draw-state state)) state))Hi JasonHere is an example of generating 3 pdfs and svg files in the loop: http://quil.info/api/output/files#do-record You should ignore the last "(is ... )" line as it's part of the test.Here is an example of using it on `:mouse-clicked` with fun-mode: https://gist.github.com/nbeloglazov/0138bd788b822a93659b901d03754f6a Every time you click mouse - it will draw state in pdf and save it as out.pdf.Hope that helps.Mikita
On Sat, Feb 29, 2020 at 3:49 PM Jason Fabris <fabu...@gmail.com> wrote:
--I'd like to be able to let a sketch run, then press a key to export to pdf.I was trying stuff like this, but it just created an empty, unparseable pdf.(defn save-pdf [](q/do-record (q/create-graphics 1400 1400 :pdf "con_squares.pdf")(draw-state))(q/exit))Do you have to exit after creating a pdf? That's the way it works in processing, but I'd rather be able to export multiple pdfs without having to stop the sketch...The docs here seem to be referring to not using fun-mode (I think?), so they don't seem to work to plug that into defsketch...I'm happy to export as svg if that's easier, but I don't know how to hook that in either...Any help would be appreciated!Jason
You received this message because you are subscribed to the Google Groups "clj-processing" group.
To unsubscribe from this group and stop receiving emails from it, send an email to clj-pro...@googlegroups.com.