|widget||Any widget in the application. Specifies the dis play and screen for which the pixmap or XImage is to be created.|
|win||For XmtCreatePixmapFromXmtImage() only, any Window or Pixmap on the same screen that the pixmap is to be created on.|
|visual||The Visual for which the pixmap or XImage is to be displayed. If NULL is specified, the default Visual of the default screen of the display of widget will be used.|
|cmap||The colormap in which colors will be allocated for the pixmap or XImage. If None is specified, the default colormap of the default screen of the display of widget will be used.|
|depth||The depth of the or XImage to be created. If 0 is specified, the default depth of the default screen of the display of widget will be used.|
|colors||An XmtColorTable used to look up any symbolic colors specified in the XmtImage. If NULL is specified, any symbolic colors will be ignored.|
|xmtimage||The XmtImage that is to be instantiated as a pixmap or XImage.|
image_return The address at which the pixmap or XImage version of xmtimage will be returned. mask_return The address at which the bitmask, if any, for xmtimage will be returned, as a pixmap or XImage. You may specify NULL if you are not interested in mask data for the XmtImage. allocated_pixels_return The address of a variable of type Pixel * at which an allocated array of the Pixel values that were allocated for the pixmap or XImage will be stored. You may specify NULL if you are not interested in this return value. This returned array must be freed with XtFree() when it is no longer needed. num_allocated_pixels_return The address of an int variable in which the number of elements of the allocated_pixels_return array will be returned, or NULL if you are not interested in this value.
True if the pixmap or XImage was created successfully, False otherwise.
XmtCreatePixmapFromXmtImage() and XmtCreateXImageFromXmtImage() convert an XmtImage to a Pixmap and to an XImage, using the display of the specified widget, and the specified visual, colormap, depth, and table of symbolic colors. If successful, these functions store the converted image at the address specified by image_return and return True. They may also return a bitmask for the image at the address specified by mask_return. If the conversion fails, these functions return False.
An XmtImage structure is the processed form of an XPM file or XPM data returned by XmtParseXpmFile() and XmtParseXpmData(). The XPM format allows different color specifications for different visual types, so a that when an XmtImage is converted for a color screen it might use a different color scheme than it would when converted for a grayscale screen. The XPM image format and XmtImage structure support symbolic color names which are looked up during the conversion using the XmtColorTable colors. The XPM image format and the XmtImage structure also support the special transparent color named None. If mask_return is non-NULL, and if the image contains any of these transparent bits, then this function will also create and return a bitmask for the image-a single-plane pixmap or XImage that has bits set for non-transparent pixels and cleared for transparent pixels.
In order to convert an XmtImage to a pixmap or XImage, this function must allocate colors. If allocated_pixels_return and num_allocated_pixels_return are not NULL, then they will be filled in with an array of the Pixel values that were allocated during the conversion, and a count of the elements in that array. This information can be used to deallocate those pixels when the pixmap is no longer needed. Note that the array of Pixel values is allocated memory, and should be freed with XtFree() once the Pixel values have been released.
When they are no longer needed, the pixmaps or XImages returned in image_return and mask_return should be freed with XFreePixmap() or XDestroyImage().
Chapter 5, Using Icons,
Chapter 4, Using Color,
XmtGetPixmap(), XmtLookupPixmap(), XmtParseXpmData(), XmtParseXpmFile().
|Xmt||XMTCREATEPIXMAPFROMXMTIMAGE (3)||Motif Tools|