Re: transparent window



In message <393575A9.F47A6D8D@echostar.com>you write:
>I create a GtkTransparency by using this new widget.
>However, It is always wrong when I use gtk_transparency_draw_pixmap(...),
>it always shows the following error message:
>
>    Gdk-ERROR **: BadMatch (invalid parameter attributes)
>    serial 386 error_code 8 request_code 62 minor_code 0
>
>And I found it seems because of the call
>    gdk_draw_pixmap (tarea->mask, tarea->bitmap_gc, src, xsrc, ysrc, xdest, yd
>est, width, height);
>in the function
>    gtk_transparency_draw_pixmap(...).
>
>But I cannot figure out what is wrong,  I wonder whether you got any idea?
>The test program what I make is as the followings:

Try specifying a null GC. The BadMatch sounds to me as though you're
using a GC with one depth in a context that requires a different one.

If I get time, I'll try out the test program you sent. 

You should also know that your program is missing an important pair of
calls. The model for GtkTransparency is based on the use of a
transparent "overhead projector" sheet:

	  wipe it clean
	  draw on it
	  project it onto the wall (display)

So, any actual use of the drawing routines should almost always be
surrounded by

	   gtk_transparency_wipe (GTK_TRANSPARENCY(widget));
	   ...
	   gtk_transparency_project (GTK_TRANSPARENCY(widget));

There are exceptions to this, but this typical usage. Sorry there is
no documentation.

--p




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]