missing function gdk_draw_bitmap()
- From: Brandon Long <blong fiction net>
- To: gtk-list redhat com
- Subject: missing function gdk_draw_bitmap()
- Date: Sat, 26 Sep 1998 05:33:25 -0700
It appears that the gdk_draw_bitmap function, though declared in gdk.h,
is not in gdkdraw.c, and hence not in the library. Makes it kinda hard
to put a bitmap on screen. Here is a go at what the code should be,
basically gdk_draw_pixmap() but with an XCopyPlane() instead of XCopyArea().
void
gdk_draw_bitmap (GdkDrawable *drawable,
GdkGC *gc,
GdkPixmap *src,
gint xsrc,
gint ysrc,
gint xdest,
gint ydest,
gint width,
gint height)
{
GdkWindowPrivate *drawable_private;
GdkWindowPrivate *src_private;
GdkGCPrivate *gc_private;
g_return_if_fail (drawable != NULL);
g_return_if_fail (src != NULL);
g_return_if_fail (gc != NULL);
drawable_private = (GdkWindowPrivate*) drawable;
src_private = (GdkWindowPrivate*) src;
if (drawable_private->destroyed || src_private->destroyed)
return;
gc_private = (GdkGCPrivate*) gc;
if (width == -1)
width = src_private->width;
if (height == -1)
height = src_private->height;
XCopyPlane (drawable_private->xdisplay,
src_private->xwindow,
drawable_private->xwindow,
gc_private->xgc,
xsrc, ysrc,
width, height,
xdest, ydest, 1);
}
--
Brandon Long "Cui merda tollenda erit?"
MD6 Crash Test Dummy
Intel Corporation
I'm too low on the totem pole to speak for Intel.
http://www.fiction.net/blong/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]