Re: Is Alpha Channel support in next release plan?
- From: Christof Petig <christof petig-baender de>
- To: Owen Taylor <otaylor redhat com>
- Cc: Miroslav Silovic <miro puremagic com>, torriem chem byu edu, gtk-devel-list gnome org
- Subject: Re: Is Alpha Channel support in next release plan?
- Date: Wed, 06 Aug 2003 17:51:13 +0200
Owen Taylor schrieb:
It's not that translucency isn't considered interesting, but
addressing it in GTK+ when it's not in the windowing system isn't
particularly interesting, or, for that matter, feasible.
That translucency is interesting is exactly what I wanted to hear from
the core team. [But this might not be news at all.]
I'll try to summarize some easy uses of transparency and try to outline
what is needed to get some parts quickly. Perhaps there's something
which can be done while waiting for X11 support.
IIRC semi transparent images within a container with a background image
are already fully working with 2.2.
- event boxes with fully transparent background (IIRC an event box
mandantes an X window which occludes background images of the containing
widget). This is what I'm interested in most, now. Or to be more
specific I want tooltips on labels/frames without occluding the
background image.
- somewhat transparent entry background (background image lightly shines
through)
- semi transparent dialogs and menus (like in the Qt hack)
- rarely semi transparent and mostly transparent status windows atop of
other windows (e.g. clocks, volume meters etc.) Very eye candy,
difficult to realize without X11 support.
I clearly see that the fact that Gtk realizes non NO_WINDOW widgets as X
subwindows (which can't be semitransparent yet) results in the first two
non-transparencies. Perhaps a hack would be to use the corresponding
part of the background of the container as a background for the image
[that's what I planned when I first met this side effect of eventbox].
Offering this as a feature of the widget set might be more interesting
since the code would be shared between different projects. (And the task
seems difficult to achive).
This would also be interesting once transparency becomes part of some X
servers but not all.
As for task 3: Grabbing the area and using it as a background might be a
fallback here (the hack used by Qt). It works 50%. But it clearly needs
1+2 resolved first.
Task 4: A combination of 3 and shape extension might emulate this on
traditional X servers.
----- gdk API issues -----------------
IIRC gdk does not allow to specify different alpha values for different
pixels. Neither does it allow to specify alpha values for
background/foreground colors. IMHO nice thing to have.
This would result in alpha enriched window contents which gdk-pixbuf can
handle but X11 can't. (see task 1+2)
I'd love to have the API and gdk support solved when X11 support comes.
We might already implement half hearted fallbacks for traditional X servers.
A) Despite claims to the contrary, windows with alpha transparency
is not a feature of X currently; it's also not really a
feature of current versions of Win32 in any general form.
(Longhorn probably will have it.) These are our primary
platforms. The only current GDK target with alpha-transparent
windows is DirectFB, and that's not even integrated into
the GTK+ distribution.
B) Some limited hacks are possible on X, and, I believe, also
on Win32, but emphasize both "limited" and "hacks"
Agreed. But perhaps something can be done now (the limited hacks).
C) Given infinite time, I might try to dust off my fade-in menus
and tooltips hack patch and integrate it properly into GDK, but
my time is very far from infinite these days. I wouldn't be
at all suprised if X *does* have transparent windows before
it hits the top of my TODO pile.
is it still available online?
D) Once our primary platforms have support for windows with alpha
transparency, I'm sure we'll support it into GDK.
without fallback methods for non capable servers? Which might serve as
expermintal ground now? I don't think so.
Yours
Christof
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]