1XpmCreatePixmap(3)             libXpm functions             XpmCreatePixmap(3)
2
3
4

NAME

6       XpmCreatePixmap - create a pixmap
7

SYNOPSIS

9       int XpmCreatePixmapFromData(Display *display, Drawable d,
10              char **data, Pixmap *pixmap_return, Pixmap *shapemask_return,
11              XpmAttributes *attributes);
12
13       int XpmCreatePixmapFromBuffer(Display *display, Drawable d,
14              char *buffer, Pixmap *pixmap_return, Pixmap *shapemask_return,
15              XpmAttributes *attributes);
16
17       int XpmCreatePixmapFromXpmImage(Display *display, Drawable d,
18              XpmImage *image, Pixmap *pixmap_return, Pixmap *shapemask_return,
19              XpmAttributes *attributes);
20
21

ARGUMENTS

23       display
24              Specifies the connection to the X server.
25
26       d      Specifies which screen the pixmap is created on.
27
28       buffer Specifies the location of the buffer.
29
30       pixmap_return
31              Returns the pixmap which is created if the color None.
32
33       shapemask_return
34              Returns the shape mask pixmap which is created if the color None
35              is used.
36
37       attributes
38              Specifies the location of a structure to get and store  informa‐
39              tion.
40
41       image  Specifies the XpmImage.
42
43

DESCRIPTION

45   XpmCreatePixmapFromData
46       To  create  a  Pixmap  from an XPM data, use XpmCreatePixmapFromData().
47       The XpmCreatePixmapFromData() function creates X images  using  XpmCre‐
48       ateImageFromData(3)  and  thus returns the same errors.  In addition on
49       success it then creates the related pixmaps, using XPutImage(3),  which
50       are returned to pixmap_return and shapemask_return if not NULL, and fi‐
51       nally destroys the created images using XDestroyImage(3).  Do not  for‐
52       get to free the returned pixmaps, the colors, and possibly the data re‐
53       turned into the XpmAttributes structure when done.
54
55
56   XpmCreatePixmapFromBuffer
57       To create a Pixmap from an XPM buffer, use XpmCreatePixmapFromBuffer().
58       The XpmCreatePixmapFromBuffer() function works the same way as XpmRead‐
59       FileToPixmap(3), it just calls XpmCreateImageFromBuffer(3)  instead  of
60       XpmReadFileToImage(3).
61
62
63   XpmCreatePixmapFromXpmImage
64       XpmCreatePixmapFromXpmImage()  creates X images calling XpmCreateImage‐
65       FromXpmImage(3) with the given XpmImage and XpmAttributes, then it cre‐
66       ates the related pixmaps which are returned to pixmap_return and shape‐
67       mask_return using XPutImage(3).  Finally it destroys the X images  with
68       XDestroyImage(3).  When finished the caller must free the pixmaps using
69       XFreePixmap(3), the colors  using  XFreeColors(3)  or  the  application
70       equivalent  function when the standard Xlib functions are not used, and
71       possibly the data returned  into  the  XpmAttributes  using  XpmFreeAt‐
72       tributes(3).
73
74

SEE ALSO

76       XpmCreateImageFromData(3), XpmCreateImageFromXpmImage(3),
77       XpmFreeAttributes(3), XpmReadFileToPixmap(3)
78
79
80
81
82X Version 11                     libXpm 3.5.15              XpmCreatePixmap(3)
Impressum