[Mono-winforms-list] transparency and translucency

Miguel de Icaza miguel@ximian.com
Tue, 28 Sep 2004 23:45:09 -0400


> Can linux handle transparent and/or translucent windows ?
> By transparent, I am talking about a window that can have 'holes'

The window can have holes.  They are called "Shaped Windows".

> By translucent, I am talking about a window that can fade in/out, blending 
> with the desktop background.

Well, this is trivial to implement fade in/out:

	* Render image into pixmap.
	* Grab server.
	* Screenshot area.
	* Iterate over transparency, render into screen.
	* Release grab.

Blending has been done forever, but it is limited.

> Also, by translucent and transparent, I am talking about applying partial 
> opacity to certain areas of the window.

Shaped windows only have one bit of alpha channel: full or not.

New versions of X support more advanced transparency than describe
above, but you will have to ask on the proper lists to get a good

> I have written a new UI toolkit for my company - because I am not completely 
> happy with the MS implementation of a few controls - , and among other things 
> I re-wrote a complete menu class that looks like the Outlook 2003 menus, with 
> shadowed border.

You get shadows for free on new versions of X, otherwise you have to
resort to the hack I mentioned before.

> I have written a *lot* of user controls under c# and could contribute some of 
> my experience. But if linux (or X11) doesn't handle transparency and 
> translucency for a window, then it makes no sense for my to contribute here.
> max
> _______________________________________________
> Mono-winforms-list maillist  -  Mono-winforms-list@lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-winforms-list
Miguel de Icaza <miguel@ximian.com>