|
NAMEXmtCreatePixmapFromXmtImage(), XmtCreateXImageFromXmtImage() - create a pixmap or XImage from an XmtImage.SYNOPSIS#include <Xmt/Xpm.h>
Boolean XmtCreatePixmapFromXmtImage(Widget widget, Drawable win, Visual *visual, Colormap cmap, unsigned int depth, XmtColorTable colors, XmtImage *xmtimage, Pixmap *image_return, Pixmap *mask_return, Pixel **allocated_pixels_return, int *num_allocated_pixels_return) Boolean XmtCreateXImageFromXmtImage(Widget widget, Visual *visual, Colormap cmap, unsigned int depth, XmtColorTable colors, XmtImage *xmtimage, XImage **image_return, XImage **mask_return, Pixel **allocated_pixels_return, int *num_allocated_pixels_return) ARGUMENTSINPUTS
OUTPUTS
RETURNS True if the pixmap or XImage was created successfully, False otherwise. DESCRIPTIONXmtCreatePixmapFromXmtImage() 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(). SEE ALSOChapter 5, Using Icons,Chapter 4, Using Color, XmtGetPixmap(), XmtLookupPixmap(), XmtParseXpmData(), XmtParseXpmFile().
Visit the GSP FreeBSD Man Page Interface. |