Fade in/Fade out of a window with XRender and Xcomposite
Carl Worth
cworth at cworth.org
Mon Feb 18 16:21:31 PST 2008
On Sat, 16 Feb 2008 13:40:56 +0100, "Pierre Nicolas-Nicolaz" wrote:
> I'm trying to understand how to make a fade in/fade out of a window
> with the Xrender and Xcomposite extension.
...
> So, can anyone give me a good link on how to do things like this, or
> explain me how to use XRender/XComposite extension please ?
So there's a rather complex series of events to do this kind of
thing. And it's not obvious which part you're wanting to do.
With the composite extension, window contents can be redirected to
offscreen areas and then a "compositing manager" is responsible for
combining the final window contents. Any reasonable compositing
manager will respect the contents of the alpha channel for any window
that has an alpha channel, (that is, if it has an ARGB visual).
Meanwhile, before the X Render extension, there was no support in the
X server for usefully computing any alpha channel contents for a
window. So the X Render extension is very useful for an application
wanting to do interesting things with alpha. Meanwhile, the XRender
library is very low-level and not easy to use directly. So it's often
desirable to use a higher-level library for computing the interesting
alpha content, (this is exactly what cairo was invented for, for
example).
What's not clear to me at all is what you're wanting to do. Are you
wanting to write an application program that will create a window that
will fade in (by means of an existing compositing manager)? Are you
wanting to write a new compositing manager to handle the fading in/out
of existing program's windows? Perhaps even fading in/out windows that
don't have any specific alpha channel?
Perhaps you're just wanting to achieve a "window fade-in" effect and
you have no idea whether that means writing a compositing manager or
not?
Please feel free to describe what you want further, and we'll try to
answer. There's certainly no doubt that some of the concepts are hard
to get by just googling. (We could probably all do a better job of
documenting the pieces---but sometimes the system-level "big picture"
is particularly hard to get across.)
-Carl
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.x.org/archives/xorg/attachments/20080218/0c29081d/attachment.pgp>
More information about the xorg
mailing list