[Gambas-user] DrawArea problems with gtk in 3.3.90 - rev. #5417

Benoît Minisini gambas at ...1...
Sun Dec 9 16:05:19 CET 2012


Le 08/12/2012 22:01, Willy Raets a écrit :
> Problem occurred on Gambas 3.3.90 - rev. #5417
> Works correctly on Gambas 3.3.4
>
> Must be caused by new implementation of DrawArea.
>
> DrawArea behaves correctly with qt4, gives trouble with gtk
>
> Attached source archive to see the problem.
>
> Step 1: Run the application to see what the intention is (it uses qt4)
> Step 2: Change component qt4 to gtk and run again to see the problem.
>
> Thanks,
>
> Willy
>

It is fixed in revision #5420.

But note the way you are doing animation is not good:
- You are drawing on a non-cached DrawingArea outside of a Draw event. 
You must not do that, even if at the moment it works because you are 
using X-Window. Use a cached DrawingArea, or paint only inside the Draw 
event handler.

- You are using the WAIT instruction. You should use a Timer instead. 
For example, to make animations in the MediaPlayer example, I have 
implemented a little class named CAnimation. I suggest you look at it 
and steal it.

Regards,

-- 
Benoît Minisini




More information about the User mailing list