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

python - Writing Greek in matplotlib labels, titles -

c# - LINQ to Entities does not recognize the method 'Int32 IndexOf(System.String, System.StringComparison)' method -

c# - Call function from DLL -