Re: [gtk-list] gdk_draw_pixmap, bitmaps, and XCopyPlane
- From: Owen Taylor <otaylor redhat com>
- To: gtk-list redhat com
- Subject: Re: [gtk-list] gdk_draw_pixmap, bitmaps, and XCopyPlane
- Date: 09 Mar 2000 12:55:31 -0500
Gary Wong <gary@CS.Arizona.EDU> writes:
> Hi,
>
> I'm an old Xlib programmer starting out with GTK+. I'm porting some
> old code of mine and have run into trouble with bitmap manipulation
> code -- I don't seem to be able to find a GDK equivalent to
> XCopyPlane(). gdk_draw_pixmap (i.e. gdk_draw_drawable) will do the
> job in some circumstances, but I can't find anything capable of
> copying between drawables of differing depths. If I include <gdk/gdkx.h>
> I can call XCopyPlane myself, of course, but that's fairly ugly.
>
> What I would like is this function:
>
> void
> gdk_draw_bitplane (GdkDrawable *drawable,
> GdkGC *gc,
> GdkDrawable *src,
> gint xsrc,
> gint ysrc,
> gint xdest,
> gint ydest,
> gint width,
> gint height,
> gulong plane)
>
> gdk_draw_bitplane would be to XCopyPlane what gdk_draw_pixmap
> (gdk_draw_drawable) is to XCopyArea. I'm happy to write a patch and
> documentation for this function if necessary, but I'd appreciate advice
> from a GDK guru first.
For GTK+-1.4, gdk_draw_pixmap() has been renamed to gdk_draw_drawable()
and automatically uses XCopyPlane when the source is a bitmap.
(We aren't going to support using XCopyPlane() when the source is not
a bitmap; this isn't useful on TrueColor displays, which by now are a large
majority of the displays out there.)
For now (GTK+-1.2), you probably should just call XCopyPlane()
directly as you say.
Regards,
Owen
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]