I am working on a project where I am simulating a life form. I am
going to represent the life form with an oval on the screen. I want it
to slowely randomly move around. I am working with a full screen
display without titlebar and so on. The only problem is, everytime I
call the paint method, it erases everything else on the screen. How
can I remedy this? Thanks.
Oliver Wong - 18 Jan 2006 23:09 GMT
>I am working on a project where I am simulating a life form. I am
> going to represent the life form with an oval on the screen. I want it
> to slowely randomly move around. I am working with a full screen
> display without titlebar and so on. The only problem is, everytime I
> call the paint method, it erases everything else on the screen. How
> can I remedy this? Thanks.
You could do your rendering onto a buffer, and then paint the whole
content of the buffer onto the screen. As long as no other threads much
around with your buffer, whatever content you left in the buffer should
still be there next time around.
- Oliver
Jacob - 19 Jan 2006 07:46 GMT
> I am working on a project where I am simulating a life form. I am
> going to represent the life form with an oval on the screen. I want it
> to slowely randomly move around. I am working with a full screen
> display without titlebar and so on. The only problem is, everytime I
> call the paint method, it erases everything else on the screen. How
> can I remedy this? Thanks.
There is a powerful 2D graphics package available
at http://geosoft.no/graphics. This will handle
these things for you.