[Gambas-user] DrawingArea Question

Rob Kudla sourceforge-raindog2 at ...94...
Mon Sep 12 23:42:14 CEST 2005


On Mon September 12 2005 17:03, Garrett R. Hylltun wrote:
> How can I keep the background image glued to the drawing area
> without having to redraw it after every clear?

You can't.  Either everything you draw is cached, or none of it is and 
you have to redraw it all every time.  And with Qt, that's slow 
enough that you can forget about any kind of game or animation that 
needs a predictable frame rate.

The SDL component in the development version is a better choice, but 
meanwhile, you might experiment with making sprites out of forms and 
messing with the Window.Mask property, which would allow you to have 
your background be static and have non-rectangular shapes move across 
it with no redrawing.  Of course, that is a hideous kludge.

Rob





More information about the User mailing list