mhemesath/r2d3 — pull request #39 by sean-j-williamson (2012-11-08 22:24:23+00:00)
Title: Adds the ability for users to define patterns

* This addition checks to see if a fill has been defined as a xlink:href and
inserts the linked pattern if so.

* Only works in SVG mode

This is my proposed workaround for https://github.com/DmitryBaranovskiy/raphael/issues/534. I think that the reasoning is fine for the pure Raphael library; but considering that d3 supports SVG patterns, I think it would be worth supporting here.

This will naturally fail in IE < 9. The user is responsible for falling back to a standard `url(image.png)` style fill.

@mhemesath, @DmitryBaranovskiy, I would appreciate any thoughts on the matter, thanks!