summaryrefslogtreecommitdiffstats
path: root/tk8.6/xlib/ximage.c
diff options
context:
space:
mode:
authorWilliam Joye <wjoye@cfa.harvard.edu>2016-12-21 22:13:18 (GMT)
committerWilliam Joye <wjoye@cfa.harvard.edu>2016-12-21 22:13:18 (GMT)
commit07e464099b99459d0a37757771791598ef3395d9 (patch)
tree4ba7d8aad13735e52f59bdce7ca5ba3151ebd7e3 /tk8.6/xlib/ximage.c
parentdeb3650e37f26f651f280e480c4df3d7dde87bae (diff)
downloadblt-07e464099b99459d0a37757771791598ef3395d9.zip
blt-07e464099b99459d0a37757771791598ef3395d9.tar.gz
blt-07e464099b99459d0a37757771791598ef3395d9.tar.bz2
new subtree for tcl/tk
Diffstat (limited to 'tk8.6/xlib/ximage.c')
-rw-r--r--tk8.6/xlib/ximage.c69
1 files changed, 0 insertions, 69 deletions
diff --git a/tk8.6/xlib/ximage.c b/tk8.6/xlib/ximage.c
deleted file mode 100644
index aaab946..0000000
--- a/tk8.6/xlib/ximage.c
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * ximage.c --
- *
- * X bitmap and image routines.
- *
- * Copyright (c) 1995 Sun Microsystems, Inc.
- *
- * See the file "license.terms" for information on usage and redistribution of
- * this file, and for a DISCLAIMER OF ALL WARRANTIES.
- */
-
-#include "tkInt.h"
-
-/*
- *----------------------------------------------------------------------
- *
- * XCreateBitmapFromData --
- *
- * Construct a single plane pixmap from bitmap data.
- *
- * NOTE: This procedure has the correct behavior on Windows and the
- * Macintosh, but not on UNIX. This is probably because the emulation for
- * XPutImage on those platforms compensates for whatever is wrong here
- * :-)
- *
- * Results:
- * Returns a new Pixmap.
- *
- * Side effects:
- * Allocates a new bitmap and drawable.
- *
- *----------------------------------------------------------------------
- */
-
-Pixmap
-XCreateBitmapFromData(
- Display *display,
- Drawable d,
- _Xconst char *data,
- unsigned int width,
- unsigned int height)
-{
- XImage *ximage;
- GC gc;
- Pixmap pix;
-
- pix = Tk_GetPixmap(display, d, (int) width, (int) height, 1);
- gc = XCreateGC(display, pix, 0, NULL);
- if (gc == NULL) {
- return None;
- }
- ximage = XCreateImage(display, NULL, 1, XYBitmap, 0, (char*) data, width,
- height, 8, (width + 7) / 8);
- ximage->bitmap_bit_order = LSBFirst;
- _XInitImageFuncPtrs(ximage);
- TkPutImage(NULL, 0, display, pix, gc, ximage, 0, 0, 0, 0, width, height);
- ximage->data = NULL;
- XDestroyImage(ximage);
- XFreeGC(display, gc);
- return pix;
-}
-
-/*
- * Local Variables:
- * mode: c
- * c-basic-offset: 4
- * fill-column: 78
- * End:
- */