This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-01-16
Channels
- # aleph (2)
- # announcements (1)
- # aws (2)
- # babashka (5)
- # beginners (122)
- # boot-dev (1)
- # cider (3)
- # clara (7)
- # cljdoc (11)
- # clojure (161)
- # clojure-dev (45)
- # clojure-europe (8)
- # clojure-france (1)
- # clojure-india (1)
- # clojure-italy (3)
- # clojure-nl (11)
- # clojure-uk (34)
- # clojurebridge (2)
- # clojurescript (13)
- # cryogen (10)
- # cursive (13)
- # datomic (25)
- # emacs (8)
- # fulcro (76)
- # graalvm (2)
- # jackdaw (5)
- # jobs-discuss (2)
- # juxt (13)
- # off-topic (13)
- # pathom (5)
- # pedestal (7)
- # quil (2)
- # reitit (9)
- # remote-jobs (4)
- # schema (1)
- # shadow-cljs (33)
- # spacemacs (8)
- # sql (9)
- # vim (2)
- # vrac (2)
Thanks. Yes, clojure2d
looks like a great alternative, and I’ll make a mental note to check it out. For this particular sketch I figured out my quil
issue via trial and error, and now I have the sketch running without opening a window at all. I assume this is possible specifically with the PDF renderer and maybe the SVG one.
The trick is to configure the sketch with :pdf
renderer, specify an output file, and then in the draw method you must wrap the drawing commands in with-graphics
and be certain to exit the sketch to avoid writing the output file over and over.
(let [gr (q/current-graphics)]
(q/with-graphics gr
(my-offscreen-draw state)
(.dispose gr)))
(q/exit)
The remaining issue with this approach is that quil
still attempts to destroy a window on exit (this is a bug, I assume) and therefore throws a null pointer exception on exit, but the exception doesn’t seem to impact the output file or anything.👍 4
4