On Apr 20, 5:29 pm, Alan G Isaac <alan.is...@gmail.com> wrote:
I need to display many (e.e., 2000) small squares whose colors are udpated
each time a computation is complete.

One approach is to put rectangles on a single canvas.
Another approach is to put many canvases in a single frame.
Another approach is to create an image each iteration,
which is placed on a canvas.
Other?

Are there obvious considerations in the choice?
(Right now I do not need to interact with the squares,
but in the future I may need to.)




On 4/20/2009 5:52 PM FogleBird apparently wrote:
First of all, what GUI toolkit are you using?

Tkinter.  (Sorry; I meant to include that in the subject line.



Secondly, in wxPython I would subclass wx.Panel and handle the
EVT_PAINT event to just draw the rectangles.  Generally I render to an
off-screen DC and just blit that in the paint event.

I'm guessing that approach will be fastest.


What kind of frame rate do you need?

20fps or less.
(Actually, at the moment, much less.)

Thanks,
Alan

--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to