kangax/fabric.js — pull request #444 by Kienz (2013-02-23 16:06:43+00:00)
Title: [BACK_INCOMPAT] Implement fabric.Gradient#toSVG() and radialGradient

- Implement radial gradient (#36) and expand linear gradient (stop-opacity should now take into account)
- toSVG() output for linear and radial gradient (#426)
- Gradients should now be included in the SVG output for the following fabric objects: circle, ellipse, line, path, polygon, polyline, rect and triangle (text is not yet implemented)
- Gradients (linear / radial) can be applied to stroke or fill property => change setGradientFill(options) to setGradient(type, options)
- Change toObject() that linear and radial gradients can be serialized
- Expand fabric.Color by 16 basic colors fabric.Color.colorNameMap => gradients with e.g. stop-color="blue" and stop-opacity="0.5 can be converted to RGBA color
- RGBA colors in svg has no affect (convert to RGB color), only stop-opacity has affect to color opacity
- Attached some test svg files http://kienzle.geschaeft.s3.amazonaws.com/projects/fabricjs/gradients/gradients.rar