[cairo] Transforming colours

Jonathan Roewen jonathan.roewen at gmail.com
Thu May 19 22:57:23 PDT 2005


I was wondering if anyone had some quick tips on implementing an
equivalent of Flash's Color.setTransform function?

>From what I can tell it takes each pixel colour component, scales it
(-100% to +100%), and adds an offset (-255 to +255).

What I'm confused about is how I can apply such a transformation to a
shape in cairo. I'm not sure if I can just replace my colour stops in
gradients with the calculated colours (which I think is prolly wrong),
or whether I need something more complicated.


More information about the cairo mailing list