Re: How to create a transparent window and ...
- From: Paul Davis <pbd Op Net>
- To: "jackjing" <jackjing ccidnet com>
- Cc: gtk-list gnome org
- Subject: Re: How to create a transparent window and ...
- Date: Wed, 18 Jul 2001 09:50:43 -0400
>I want to get a transparent window(linux) sth like solaris transparent overlay
> window, through which we can see the motion under it or we move itself.
>And one more thing is that it will be applied with XDraw* primitive.
>How can i?
if i understand your question (which i'm not sure i do) you have 2
choices:
1) use the GnomeCanvas (or its repackaged version, GtkCanvas).
this provides a drawing canvas that supports alpha transparency
and lots of other cool things.
2) get familiar with gdk_window_shape_combine_mask (). start by
finding where its used in the testgtk.c source code that
comes with GTK+. this doesn't support transparency, just
the notion of non-rectangular windows.
i have a widget called GtkTransparency which provides the same drawing
primitives as gdk (draw_line, draw_polygon, draw_text, etc); the
widget is visible *only* where it has been drawn onto. it makes heavy
use of gtk_window_shape_combine_mask(). if you want to get a copy, ask
me. note, however, that its not *transparent* - where it *has* been
drawn onto, it is 100% opaque.
you need to keep in mind that standard X servers do not support an
alpha channel for transparency purposes, so you cannot do transparency
in general unless you, not the X server, are responsible for all the
rendering. obviously, you do not control the rendering of windows not
owned by your process, so there are clear limits to what you can
accomplish in this area.
--p
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]