[cairo] Path Gradients

Bill Spitzak spitzak at thefoundry.co.uk
Fri Jan 4 17:04:35 PST 2008

Okay if I understand that paper correctly, only the square buttons are 
using path gradients. The background, and smaller background of the 
keys, are some kind of unnamed "objects".

The output display is a "Group Of Rectangles" object.

My best guess is that these are earlier graphics types they wrote and 
don't use path gradients. It is appaent that the shine on them is 
blurred as opposed to the sharp-edged one used for the buttons.

I would say that path gradients are still useless unless the path is 
very close to a circle. HOWEVER: the current Cairo radial gradient 
requires the path to be an ellipse, so this has a bit more power as 
those rounded rectangles are possible. Also they are trying to allow the 
same path object to be reused in useful ways to define both the pattern 
and the fill shape, although this seems to be leading to a bunch of 
extra fiddly controls such as the "bounding box", but still may be a 
good idea. I think otherwise there may have to be path transform 
operations added to Cairo.

A gradient drawn between two paths could be much more useful as it could 
be used to produce the blobby effects on non-square shapes.

Bobby Salazar wrote:
> That is the correct calculator. The full link to the calculator article is here:
> http://www.vgdotnet.com/articles/translucent_calculator.shtml

More information about the cairo mailing list