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

Pass DB Connection parameters to a Kettle a.k.a PDI table Input step dynamically from Excel -

multithreading - PhantomJS-Node in a for Loop -

c++ - MATLAB .m file to .mex file using Matlab Compiler -