summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwelch <welch>1998-08-04 15:30:20 (GMT)
committerwelch <welch>1998-08-04 15:30:20 (GMT)
commit9399315328a8602eaec240cb83bceaf7bd283427 (patch)
treeb7d88b1afa3f0c4a41729be4695057db0544c182
parent2dc2af64d677a5abd3adc26f3a0bec6d7c281a1a (diff)
downloadtk-9399315328a8602eaec240cb83bceaf7bd283427.zip
tk-9399315328a8602eaec240cb83bceaf7bd283427.tar.gz
tk-9399315328a8602eaec240cb83bceaf7bd283427.tar.bz2
Eliminated XReadBitmapFile emulation
-rw-r--r--xlib/ximage.c54
1 files changed, 5 insertions, 49 deletions
diff --git a/xlib/ximage.c b/xlib/ximage.c
index 057e973..0f40bf3 100644
--- a/xlib/ximage.c
+++ b/xlib/ximage.c
@@ -21,6 +21,11 @@
*
* 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.
*
@@ -64,52 +69,3 @@ XCreateBitmapFromData(display, d, data, width, height)
XFreeGC(display, gc);
return pix;
}
-
-/*
- *----------------------------------------------------------------------
- *
- * XReadBitmapFile --
- *
- * Loads a bitmap image in X bitmap format into the specified
- * drawable.
- *
- * Results:
- * Sets the size, hotspot, and bitmap on success.
- *
- * Side effects:
- * Creates a new bitmap from the file data.
- *
- *----------------------------------------------------------------------
- */
-
-int
-XReadBitmapFile(display, d, filename, width_return, height_return,
- bitmap_return, x_hot_return, y_hot_return)
- Display* display;
- Drawable d;
- _Xconst char* filename;
- unsigned int* width_return;
- unsigned int* height_return;
- Pixmap* bitmap_return;
- int* x_hot_return;
- int* y_hot_return;
-{
- Tcl_Interp *dummy;
- char *data;
-
- dummy = Tcl_CreateInterp();
-
- data = TkGetBitmapData(dummy, NULL, (char *) filename,
- (int *) width_return, (int *) height_return, x_hot_return,
- y_hot_return);
- if (data == NULL) {
- return BitmapFileInvalid;
- }
-
- *bitmap_return = XCreateBitmapFromData(display, d, data, *width_return,
- *height_return);
-
- Tcl_DeleteInterp(dummy);
- ckfree(data);
- return BitmapSuccess;
-}