Sprites and Cursors Overview

The Window Server supports two types of sprite: one for general use, another for use as a pointer cursor. A sprite is an arbitrary-shaped bitmap which may be moved without applications having to redraw the underlying screen.

The ergonomics of pointer cursors differ greatly depending on the input device. The Window Server provides pointer cursor support so that either mouse, tablet or pen may be used effectively as a pointer device.

A sprite is made up of one or more sprite members, each of which contains a bitmap image and a time interval for which that bitmap is to be displayed. Animation can be achieved by adding more than one sprite member, each with a different bitmap. The sprite members are displayed in turn in the order in which they were added, continuously returning to the beginning when the last is reached.

Pointer cursors are rarely used in pure pen architectures, but they are supported for mouse or tablet use. Pointer cursors do not need to be given a position, as they automatically track the position of the pointer. The position of a sprite, on the other hand, must be set when it is created, and can be changed by the application using RWsSprite::SetPosition().

Related concepts