On Wed, 18 Aug 2010, MacArthur, Ian (SELEX GALILEO, UK) wrote: >> Would there be any issues to be expected with setting >> up a timer callback inside the draw() event?
> I think calling add_timeout (or maybe better repeat_timeout) from within > the draw() method would be OK - though I can't recall ever having done > it... It's even slightly more complex than that. Fl_GIF_Image derives from Fl_Pixmap, which does the actual drawing. So this would mean defining draw() in Fl_GIF_Image which would then set the Fl_Pixmap data pointer to the right decoded image prior to calling Fl_Pixmap::draw(), then calling the add_ or repeat_ timeout function. Some of this would be optional, mostly depending on whether during loading, it was detected that the GIF is an animated sequence. As animation is a frequently occurring feature of GIF files, I'd figure this wouldn't be a bad thing to have as standard feature in FLTK- the overhead in extra code and performance are expected to be minimal, and neglectable when the image simply isn't animated. Looking at the bigger picture: Although I'd expect animated GIF images to animate by default, a property to force them to be static and/or being able to select a single frame to view would not a bad idea. Inside a dev tool such as fluid, having GIF images animate all over the place would be highly annoying! Best, Marc _______________________________________________ fltk mailing list [email protected] http://lists.easysw.com/mailman/listinfo/fltk

