Smooth animation (Java SWT) -


I have a question about animation drawing in Java (SWT). I try to attract some process animation. When I use the CanvasRread () program, it first erases everything that has been pulled and then pulls it again. Approximately 1000 rectangles in my program come at a per-time step (this big quantity is required), so the animation does not look smooth - it blinks all the time for example, for painting new objects on old objects, without erasing them ( Which will look better anyway) is this easy way?

Fixing instability when using custom painting is to use double buffering, SWT canvas object is built in double-buffering Use it by adding the flag to the styles in the constructor:

  canvas myCanvas = new canvas (parent composite, SWT.DOUBLE_BUFFERED);    

Comments

Popular posts from this blog

asp.net - Procedure or function "Procedure name" expects a parameter "Param name" which was not supplied occurs rarely -

jsp - No mapping found for HTTP request with URI with annotation config Spring MVC and Jetty -

sql server ce - Is there some way to make sqlce3.5 and 4.0 co-exist in the C# project -