Rendering single images with quil?

21 views
Skip to first unread message

Chris Anderson

unread,
Jul 28, 2016, 5:57:27 AM7/28/16
to clj-processing
I'd like to give Quil a list of rectangle specifications (from outside of the draw function) and get pixels back. From what I've seen, it's hard to get things passed to draw, and hard to run Quil in a headless way. 

Am I just looking at the wrong library? Is there an easier way to handle this in Clojure?

Nikita Beloglazov

unread,
Jul 29, 2016, 2:43:48 AM7/29/16
to clj-processing
Hi Chris

Yes, I believe you can't use quil in headless mode so I guess it's not the right tool for your needs. I'd suggest looking into clisk or imagez though I'm not sure they have "drawing" API. The only relevant method for drawing I found is fill-rect!

Alternatively you can try using Java directly. It's not that ugly. Here is an example of function that takes a collection of lines and returns image with lines drawn on it: https://github.com/nbeloglazov/GeekAlarm/blob/master/server/src/com/geekalarm/server/tasks/triangles_count.clj#L118

Nikita

On Thu, Jul 28, 2016 at 2:57 AM Chris Anderson <halfa...@gmail.com> wrote:
I'd like to give Quil a list of rectangle specifications (from outside of the draw function) and get pixels back. From what I've seen, it's hard to get things passed to draw, and hard to run Quil in a headless way. 

Am I just looking at the wrong library? Is there an easier way to handle this in Clojure?

--
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.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages