Animation question

Andrea Gavana ha scritto:

Hi Luca,

   I'm woking for an animation with wxPython. I need to move an image
and zoom it. I've tried with DCs, using double buffer method to reduce
the flicking. So I've tested the animation on 2 computers: they have
almost the same features, (the bigger difference is on the graphical
board: computer1 mounts geForce, computer2 Ati)but on computer1 the
animation works slowly, and the process needs the 100% of CPU. Computer2
takes this animation more easy and needs only 30-35% of CPU and it
results more fluid and nice to see. I'll need to run this animation on a
low performance computers...maybe I'm doing something wrong...

Any ideas?

Ciao Andrea,

Two or three of them:

1) Try FloatCanvas: wx.lib.floatcanvas

Do you think this could be work better?

2) Are you using wx.BufferedPaintDC() together with an empty
wx.EVT_ERASE_BACKGROUND?

Yes, I'm using BufferedDC but not wx.EVT_ERASE_BACKGROUND.

3) If you post some code, I am sure some DC guru can help you.

I simply use a wx.Bitmap and a wxDC.SetUserScale for the zoom... 30 or 40 code lines..

Andrea.

"Imagination Is The Only Weapon In The War Against Reality."
http://xoomer.virgilio.it/infinity77/

---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org

Thanks for your help

···

On 4/2/07, Luca Politti wrote:

Andrea Gavana ha scritto:

···

On 4/2/07, Luca Politti wrote:

Andrea Gavana ha scritto:
> 1) Try FloatCanvas: wx.lib.floatcanvas
Do you think this could be work better?

It will, FloatCanvas is extremely well optimized for those things.

> 2) Are you using wx.BufferedPaintDC() together with an empty
> wx.EVT_ERASE_BACKGROUND?
Yes, I'm using BufferedDC but not wx.EVT_ERASE_BACKGROUND.

You should. It helps quite a lot with flickering.

> 3) If you post some code, I am sure some DC guru can help you.
>
I simply use a wx.Bitmap and a wxDC.SetUserScale for the zoom... 30 or
40 code lines..

This just *enforce* the fact that you should post your code. I believe
Robin has written it 10000 times till now: "please make a small
runnable sample that we can test".

Andrea.

"Imagination Is The Only Weapon In The War Against Reality."
http://xoomer.virgilio.it/infinity77/

---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org

Ok, thanks a lot Andrea
Luca