Previous: , Up: Windows and Pixmaps   [Contents][Index]


5.8 Pixmaps

A pixmap is a three-dimensional array of bits. A pixmap is normally thought of as a two-dimensional array of pixels, where each pixel can be a value from 0 to 2n-1, where n is the depth of the pixmap. A pixmap can also be thought of as a stack of n bitmaps. A bitmap is a single bit pixmap of depth 1. CLX provides functions to:

Note that pixmaps can only be used on the screen where they were created. Pixmaps are off-screen server resources that are used for a number of operations. These include defining patterns for cursors or as the source for certain raster operations.

Function: create-pixmap &key :width :height :depth :drawable
:width
:height

The nonzero width and height (type card16). These parameters are required.

:depth

The depth (type card8) of the pixmap. This parameter is required.

:drawable

A drawable which determines the screen where the pixmap will be used. This parameter is required.

Creates a pixmap of the specified :width, :height, and :depth. It is valid to pass a window whose class is :input-only as the :drawable argument. The :width and :height arguments must be nonzero. The :depth must be supported by the screen of the specified :drawable.

pixmap

Type pixmap.

Function: free-pixmap pixmap
pixmap

A pixmap.

Allows the X server to free the pixmap storage when no other server resources reference it. The pixmap should never be referenced again.

Function: pixmap-display pixmap
pixmap

A pixmap.

Returns the display object associated with the specified pixmap.

display

Type display.

Function: pixmap-equal pixmap-1 pixmap-2
pixmap-1
pixmap-2

A three-dimensional array of bits to be tested.

Returns true if the two arguments refer to the same server resource, and nil if they do not.

Function: pixmap-id pixmap
pixmap

A pixmap.

Returns the unique resource ID that has been assigned to the specified pixmap.

id

Type resource-id.

Function: pixmap-p object
pixmap

Type boolean.

Returns true if the argument is a pixmap object and nil otherwise.

Function: pixmap-plist pixmap
pixmap

A pixmap.

Returns and (with setf) sets the property list for the specified pixmap. This function provides a hook where extensions can add data.

plist

A property list.


Previous: , Up: Windows and Pixmaps   [Contents][Index]