7.5 Direct Image Transfer

For cases where the image representation is not needed, CLX provides functions to read and display image data directly.



get-raw-image drawable &key :data (:start 0) :x :y :width :height :plane-mask (:format :z-format) (:result-type '(vector card8)) Function
        
drawable
A drawable.
:data
An optional sequence of card8.
:start
The index of the first :data element modified.
:x, :y
card16 values defining the size of the image returned. These arguments are required.
:width, :height
card16 values defining the size of the image returned.These arguments are required.
:plane-mask
A pixel mask.
:format
Either :xy-pixmap or :z-pixmap. This argument is required.
:result-type
The type of image data sequence to return.

Returns a sequence of image data from the region of the drawable given by :x, :y, :width, and :height. If :data is given, it is modified beginning with the element at the :start index and returned. The depth and visual type ID of the drawable are also returned.

The bits for all planes selected by 1 bits in the :plane-mask are returned as zero; the default :plane-mask is all 1 bits. The :format of the returned pixel values may be either :xy-format or :z-format. The :result-type defines the type of image data returned.

The calling program is responsible for handling the byte-order and bit-order returned by the server for the drawable's display (see display-byte-order and display-image-lsb-first-p).

data
Type sequence or card8.
depth
Type card8.
visual
Type card29.


put-raw-image drawable gcontext data &key (:start 0) :depth :x :y :width :height (:left-pad 0) :format Function
        
drawable
The destination drawable.
gcontext
The graphics context used to display the image.
data
A sequence of integers.
:start
The index of the first element of data displayed.
:depth
The number of bits per pixel displayed. This argument is required.
:x, :y
The position in the drawable where the image region is displayed. These arguments are required.
:width, :height
card16 values defining the size of the image region displayed. These arguments are required.
:left-pad
A card8 specifying the number of leading bits to discard for each image scanline.
:format
One of :bitmap, :xy-pixmap, or :z-pixmap.

Displays a region of the image data defined by :start, :left-pad, :width, and :height on the destination drawable, with the upper-left pixel of the image region displayed at the drawable position given by :x and :y.

The :format can be either :xy-pixmap, :z-pixmap, or :bitmap. If :xy-pixmap or :z-pixmap formats are used, :depth must match the depth of the destination drawable. For :xy-pixmap, the data must be in XY format. For :z-pixmap, the data must be in Z format for the given :depth.

If the :format is :bitmap, the :depth must be 1. In this case, the image is combined with the foreground and background pixels of the gcontext. 1 bits of the image are displayed in the foreground pixel and 0 bits are displayed in the background pixel.

The :left-pad must be zero for :z-pixmap format. For :bitmap and :xy-pixmap formats, the :left-pad must be less than the bitmap-scanline-pad for the drawable's display (see display-bitmap-format). The first :left-pad bits in every scanline are to be ignored by the server; the actual image begins that many bits into the data.

The following attributes of the gcontext are used to display the image: clip-mask, clip-x, clip-y, function, plane-mask, and subwindow-mode.

The calling program is responsible for handling the byte-order and bit-order required by the server for the drawable's display (see display-byte-order and display-image-lsb-first-p).