Back to index

plt-scheme  4.2.1
CrBufFrP.c File Reference
#include "xpmP.h"
#include <strings.h>

Go to the source code of this file.


int XpmCreateBufferFromPixmap (Display *display, char **buffer_return, Pixmap pixmap, Pixmap shapemask, XpmAttributes *attributes)

Function Documentation

int XpmCreateBufferFromPixmap ( Display *  display,
char **  buffer_return,
Pixmap  pixmap,
Pixmap  shapemask,
XpmAttributes attributes 

Definition at line 43 of file CrBufFrP.c.

    XImage *ximage = NULL;
    XImage *shapeimage = NULL;
    unsigned int width = 0;
    unsigned int height = 0;
    int ErrorStatus;

    /* get geometry */
    if (attributes && attributes->valuemask & XpmSize) {
       width = attributes->width;
       height = attributes->height;
    /* get the ximages */
    if (pixmap)
       xpmCreateImageFromPixmap(display, pixmap, &ximage, &width, &height);
    if (shapemask)
       xpmCreateImageFromPixmap(display, shapemask, &shapeimage,
                             &width, &height);

    /* create the buffer */
    ErrorStatus = XpmCreateBufferFromImage(display, buffer_return, ximage,
                                      shapeimage, attributes);

    /* destroy the ximages */
    if (ximage)
    if (shapeimage)

    return (ErrorStatus);

Here is the call graph for this function: