Lyle Johnson wrote:
> 
> > Is the FXCanvas suitable for 2D animation of the kinds that Tk can do?
> 
> I'm honestly not familiar with animation in Tk's canvas widget. If I were
> going to set out right now to do animation in an FXCanvas, though, I guess I
> would set up a timer to fire every n milliseconds and then erase and redraw
> the canvas. A better approach, which would avoid flickering, would instead
> draw into an offscreen buffer (like an FXImage) and then blit that image to
> the canvas in one shot.

Tk's canvas manages layers of display items for you. Items can be
geometric shapes, bitmaps, text, even additional child windows. You can
move them, group them, find the nearest item to a point, zoom, scroll,
etc. You can bind mouse and key event handlers with items. It's nice and
easy, but I don't like the overall look and feel of Tk. I'm rewriting
some C/Tcl/Tk animation code in Ruby. I like FXRuby, so maybe I'll do
the animation canvas in Ruby/Tk running in a separate process and
communicate with the control GUI based on FOX. That might even be a
performance win on MP systems.

Thanks for your help.

--
Joel VanderWerf                          California PATH, UC Berkeley
mailto:vjoel / path.berkeley.edu                     Ph. (510) 231-9446
http://www.path.berkeley.edu                       FAX (510) 231-9512