On Tue, 2009-03-31 at 12:48 +0200, Jasper van de Gronde wrote:
Ted Gould wrote:
... Since it seems that I'm a minority opinion on this issue, I'll stick to trying to limit the spread of this cancer in the codebase. What I'd like to see is that for every bitmap fallback, it's *proven* that what we're falling back on can't be implemented in SVG. Explain the solutions that have been tried and why they can't work. The whole thing. I'd like it to really be a last resort.
What about "approximating" a conical gradient with feDiffuseLighting on an actual cone? This seems to give reasonably good results by itself, and if need be we could probably improve the approximation with things like feComponentTransfer and feComposite (possibly even dividing the space into separate regions so each region can be approximated individually). It should be possible to get a quite good approximation this way.
If you're wondering what to do about gradients with multiple stops and stuff like that, if worst comes to worst we could always resort to using the computed values for a lookup using feDisplacementMap.
I think that sounds interesting. I was looking at using a couple of radial gradients and a custom composition function. I keep getting bogged down in some of the math though. Your way sounds cleaner, mock it up, let's get a few ideas out there :)
--Ted