[compiz] Greetings, first remarks about trying to do customizable drop-shadows

Mirco Müller macslow at bangang.de
Sun Apr 2 03:09:26 PDT 2006


Hello there everybody!

	Terrific... a mailing-list for compiz with David on board! Ok, I
started off with writing some functions using cairo to draw me the
needed elements for drop-shadows (atm stand-alone to focus on the proper
generation of the shadow-parts) and currently still fiddle with the
tweakable parameters. Right now I have...

	shadow-radius (e.g. 20 pixels)
	2D-offset vector (e.g. 10 pixels right, 15 pixels downwards)
	start-color as rgba (e.g. 0.2/0.2/0.2/1.0)
	end-color as rgba (e.g. 0.2/0.2/0.2/0.0)

and try to figure out how I best approach the splitting up of the 5 to 8
shadow-elements (top-left, top, top-right, left, right, bottom-left,
bottom, bottom-right) depeding on the length of the offset-vector being
=, < or > to the radius. I am also not sure how to attack the problem of
rounded corners of the windows decoration-frame. If the shadow-textures
will align with the outter edges of the decoration-frame there will be
"unshadowed" gaps at the rounded corners. If I have the shadow-textures
overlap a bit inwards it might look funny if the windows opacity changes
to transparent. Right now the only solution for this is to fill the
inner part of the drop-shadow with a rectangle having the start-color.
But this solution causes heavy overdraw. While my midrange GeForce might
deal with this happily I don't know how e.g. integrated graphic-chips
from intel on shared memory can deal with the bandwidth issues that
might arise from such an approach. What's your opinion on this? BTW, did
I make myself clear enough or should I gimp up a quick schematic of the
whole issue?

	Once that's finished I intend them to be stuffed into textures and then
injected in gnome-window-decorator.c as a first test (replacing the
hard-coded inline pixmaps) to see if everything regarding the tweakable
parameters works as expected.

Best regards...

MacSlow

-- 
email - macslow at bangang.de
www - http://macslow.thepimp.net
lowfat - http://macslow.thepimp.net/sponsor-it



More information about the compiz mailing list