Next | Prev | Up | Top | Contents | Index

Using Animations

Animation in its simplest form consists of drawing an image, clearing it, and drawing a new, slightly different one in its place. However, attempting to draw into a window while that window is being displayed can cause problems such as flickering. The solution is double buffering.

This section discusses double-buffered animation inside an X Window System environment, providing example code as appropriate. You learn about

Xt provides two mechanisms that are suited for continuous animation:

Note: Controlling animations with workprocs and timeouts applies only to Xt-based programs.


Swapping Buffers
Controlling an Animation With Workprocs
Controlling an Animation With Timeouts

Next | Prev | Up | Top | Contents | Index