Simple Composite app?

Chris Debenham chris at adebenham.com
Wed Nov 17 15:31:44 PST 2004


On Wed, Nov 17, 2004 at 04:21:46PM -0500, Carl Worth wrote in a legally binding way:
> Date: Wed, 17 Nov 2004 16:21:46 -0500
> From: Carl Worth <cworth at cworth.org>
> To: chris at adebenham.com,
> 	Discuss issues related to the xorg tree <xorg at freedesktop.org>
> Subject: Re: Simple Composite app? 
> 
> On Thu, 02 Sep 2004 14:38:13 +1000, Chris Debenham wrote:
> > Does anyone have a very simple app that uses the new ARGB visual to make a
> > window with some bits transparent?
> 
> Hi Chris,
> 
> I had been meaning to play with ARGB visuals this myself for quite some
> time and I thought your email would provide a nice exercise. Only now did
> I finally get around to it though.
> 
> > Basically I just want to:
> > * Create a window
> > * Make it transparent
> > * draw a opaque box on it
> > * draw a translucent box on it
> 
> I wrote an Xlib-only program (argb_demo) to do just that and just sent
> it to the list in the "creating true transparent widgets" thread.
> 
> > Can this be done with pure xlib or do I also need cairo etc?
> 
> As demonstrated above, Xlib is sufficient for doing it, but my example
> is really, really simple, (non-overlapping rectangles of uniform color).
> 
> Drawing anything significantly more interesting, (overlapping composited
> shapes, antialiased curves, etc.), means computing the right pixel
> values on the client side. And Xlib won't help much.
> 
> This is where cairo comes in---it makes this task much easier.
> 
> Here's another program that is a variation of argb_demo. It replaces the
> Xlib-based draw function with something cairo-based that also
> demonstrates how to use different compositing operators, and how to draw
> arcs and splines.
> 
> I hope you find this useful.
> 
> -Carl
> 

Excellent, this is exactly what I was looking for.
As a new/side issue, this works when running under metacity + xcompmgr
but not when running under FVWM (2.5.12) + xcompmgr
Is there something the WM must do to allow composite to work under it?

Chris


-- 
I Hope You Sit On The Tack Of Success And Rise Rapidly.



More information about the xorg mailing list