CrPixFBit.c File Reference

#include <X11/Xos.h>
#include <X11/Xlib.h>
#include <X11/Xmu/Drawing.h>

Include dependency graph for CrPixFBit.c:

Go to the source code of this file.

Functions

Pixmap XmuCreatePixmapFromBitmap (Display *dpy, Drawable d, Pixmap bitmap, unsigned int width, unsigned int height, unsigned int depth, unsigned long fore, unsigned long back)


Function Documentation

Pixmap XmuCreatePixmapFromBitmap ( Display *  dpy,
Drawable  d,
Pixmap  bitmap,
unsigned int  width,
unsigned int  height,
unsigned int  depth,
unsigned long  fore,
unsigned long  back 
)

Definition at line 46 of file CrPixFBit.c.

References gc.

00058 {
00059     Pixmap pixmap;
00060 
00061     pixmap = XCreatePixmap (dpy, d, width, height, depth);
00062     if (pixmap != None) {
00063         GC gc;
00064         XGCValues xgcv;
00065 
00066         xgcv.foreground = fore;
00067         xgcv.background = back;
00068         xgcv.graphics_exposures = False;
00069 
00070         gc = XCreateGC (dpy, d,
00071                         (GCForeground | GCBackground | GCGraphicsExposures),
00072                         &xgcv);
00073         if (gc) {
00074             XCopyPlane (dpy, bitmap, pixmap, gc, 0, 0, width, height, 0, 0, 1);
00075             XFreeGC (dpy, gc);
00076         } else {
00077             XFreePixmap (dpy, pixmap);
00078             pixmap = None;
00079         }
00080     }
00081     return pixmap;
00082 }


Generated on Sun Mar 4 16:03:38 2007 for Scilab [trunk] by  doxygen 1.5.1