Re: Semi-transparent GdkWindows?



Am Sonntag, den 11.09.2005, 10:41 +0200 schrieb Christian Neumair:
Am Sonntag, den 11.09.2005, 10:26 +0200 schrieb Christian Neumair:
I'm currently trying to implement a semi-transparent drag window for
Nautilus. I'm trying to do this by creating a window widget and
connecting to its "expose-event", and then drawing onto it this handler.
Unfortunately, gdk_window_shape_combine_mask takes a bilevel alpha mask,
i.e. full alpha vs. no alpha, probably since the X extension it uses
just sets the window shape, so all I can do is draw a offscreen drawable
on the windows and set its bilevel alpha mask.

I played around with cairo, but it also seems to draw onto the window
and there doesn't seem to be any way to do something like
gdk_window_fill (0x00000000).

So my sad and hopefully wrong conclusion is that GdkWindows and the
underlying Windows don't seem to have a full alpha channel. Can cairo
help me here? Do we need a new, more powerful, X extension?

Thanks for your replies in advance!

Sorry for molesting you. I was just tired and a bit frustrated because I
spent a whole night on the issue. Turns out that probably GTK+/GDK API
isn't powerful enough and I have to use Xrender.

I wanted to do this using cairo, but I failed.
I have a GdkPixbuf containing alpha information. My cairo context is
created for my GdkWindow on "expose-event". When painting with
cairo_paint_with_alpha, I still don't get transparency effects for the
containing Window. I suppose that I'm just painting on top of the Window
instead of painting the Window itself. Do I need a compositing manager
and the compositing extension [1] that this works? There seem to be
internal cairo functions which could be useful, like
_cairo_surface_composite.

Help appreciated!

[1] http://freedesktop.org/wiki/Software_2fCompositeExt

-- 
Christian Neumair <chris gnome-de org>


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