Next: , Previous: , Up: RENDER - A new rendering system for X11   [Contents][Index]


16.3.5 Using cursors

Function: render-create-cursor picture &optional (x 0) (y 0))

Creates cursor object from xrender picture. The x and y coordinates define the hotspot relative to the source’s origin and must be a point within the source. The resulting picture will nominally be drawn to the screen with :over operator.

The components of the cursor may be transformed arbitrarily to meet display limitations. In particular, if the display supports only two colors cursors without translucency, the cursor will be transformed so that areas less than .5 alpha will be transparent, else opaque, and areas darker than 50% gray will be black else white.

The source picture can be freed immediately if no further explicit references to it are to be made.

Subsequent drawing in the source has an undefined effect on the cursor. The server might or might not make a copy of the picture.

Function: render-create-anim-cursor cursors delays

Creates cursor object. cursors must be list of cursors, delays must be list of delays (in milliseconds). Lengths of lists must be the same.

When active, the cursor image on the screen will cycle through cursors, showing each cursor in the element for the number of milliseconds indicated by the delays member of that element.