XieImport(3X) — Subroutines
Digital
NAME
XieImport − This routine imports an X11 drawable image to a photomap.
C Format
photomap = XieImport(dpy, drawable, cmap_id, pxl_pol)
C Argument Information
XiePhotomap photomap;
Display ∗dpy;
Drawable drawable;
Colormap cmap_id;
unsigned char pxl_pol;
RETURN VALUES
The routine returns the imported photomap identifier in the photomap argument. You can free the photomap using the XieFreeResource routine.
PARAMETERS
dpyThe dpy argument specifies the X11 display identifier returned by the XOpenDisplay routine.
drawableThe drawable argument specifies the X11 drawable identifier returned by routines such as XCreateWindow and XCreatePixmap.
cmap_idThe cmap_id argument specifies the X11 colormap the routine uses to convert source drawable pixel indices to RGB values in the imported photomap.
pxl_polThe pxl_pol argument specifies the pixel polarity attribute assigned to the imported photomap. For image data imported from a drawable greater than depth 1, specify the pixel polarity symbol XieK_ZeroDark. For pixmaps having a depth of 1, the pixmap data may not map directly to a colormap index. Therefore, you must specify the desired pixel polarity for the imported image. Specify either the XieK_ZeroDark or XieK_ZeroBright symbol.
DESCRIPTION
This routine imports an X11 drawable image to a photomap. You cannot import a drawable to a photoflo. The routine analyzes the drawable data to determine the component mapping for the imported photomap. If the depth of the drawable is 1 or all pixels are either black or white, the routine set the component mapping to XieK_Bitonal. If any pixel contains unequal RGB values, the routine sets the component mapping to XieK_RGB. Otherwise, the routine sets the component mapping to XieK_GrayScale.
If you selected computation events using the XieSelectEvents routine, the routine adds an XieK_ComputationEvent to the X11 event queue when the routine is completed.
XIE Events and Error Messages
Protocol Messages: X_ieImportImage
XIE event returned: XieK_ComputationEvent if immediate execution and computation events are selected
XieLib errors: Reply error, BadLength
XieServer errors: BadIDChoice -- Invalid identifier
BadAlloc -- Insufficient server resources
BadDrawable -- Invalid X11 drawable
BadMatch -- The X11 drawable is not entirely visible on the screen
BadColor -- Invalid X11 colormap