I was looking for a way to display a simulation in Julia. Originally I was 
going to just use PyPlot, but it occurred to me it would be better to just 
use Gtk+ + Cairo to do the drawing rather than something whose main purpose 
is drawing graphs.

So far, following the examples on the Github page, I have no problem 
creating a window with a Cairo canvas. I can also display content on the 
canvas fairly easily (which speaks volumes on the awesomeness of Julia and 
the Gtk+ library). However, after looking through the code and samples, 
it's not obvious to me how to redraw the canvas every fraction of a second 
to display new content.

I did find an example of animating with Cairo and Gtk+ in C 
(http://cairographics.org/threaded_animation_with_cairo/). However, I 
assume one would want to use Julia's timers instead of of GLibs? Secondly, 
there in their function 'timer_exe', call is made directly to Gtk+ to send 
a redraw queue to the window. Is there a cleaner way to do it with the Gtk+ 
library?

Thanks!
A

Reply via email to