Jameson is correct in saying that for this project you need to abandon Tk and 
use Gtk. As far as I can tell, Tk has no notion of updating a portion of a 
window, so update has to redraw the entire window. That's why you get this:

On Monday, July 07, 2014 08:49:09 AM De Prins Maxime wrote:
> But it is slow and not very nice.

because it is very expensive to redraw the entire window just to change a 
couple of pixels.

Gtk, on the other hand, seems to allow you to invalidate a portion of a window 
and just redraw that. See this function:
https://github.com/JuliaLang/Gtk.jl/blob/master/src/events.jl#L100-L108
You're probably going to want to do something along the lines of what's in the 
commented-out portion.

Also, while I'm not sure it's relevant for your use-case, one possible 
resource is the gtk branch of ImageView, which exists to display images. The 
top-level function is here:
https://github.com/timholy/ImageView.jl/blob/gtk/src/display.jl#L744-L747
You'll have to dig into the sub-functions yourself.

--Tim

On Monday, July 07, 2014 08:49:09 AM De Prins Maxime wrote:
> Thanks you Jameson but i am here to learn and I woud like to see what's
> happening in details.
> 
> What code line is giving my color to my graphic cart and display the pixels
> 
> I wanna understand very closesly.

Reply via email to