Closed jeffreyrosenbluth closed 10 years ago
The gradient calculation in SVG rely on object bounding boxes, as I don't have any support for bounding boxes, I can't do it quickly.
The main pain point is precise bounding box of cubic & quadratic bezier curve, otherwise it is trivial.
It turns out that I was wrong and that I don't think I need % radii. What I need are gradient transforms like Cairo and SVG have. How hard would this be to implement?
The transformTexture function should fit the bill.
That being said, I may implement bounding in the future, if I want to make rasterific-svg more or less standard compliant.
cool, somehow I missed this :)
On Fri, Apr 18, 2014 at 4:09 AM, Vincent notifications@github.com wrote:
The transformTexturehttp://hackage.haskell.org/package/Rasterific-0.2/docs/Graphics-Rasterific-Texture.html#v:transformTexturefunction should fit the bill.
— Reply to this email directly or view it on GitHubhttps://github.com/Twinside/Rasterific/issues/12#issuecomment-40794109 .
We are adding gradients to diagrams and in order to do it properly in the Rasterific backend we need to be able to specify the radius as a proportion between 0 and 1. See for example the SVG definition:
http://www.w3.org/TR/SVG11/pservers.html#RadialGradients
here is an example of SVG code: http://www.w3schools.com/svg/svg_grad_radial.asp
that produces an elliptical gradient.