phoboslab/Ejecta — pull request #455 by ricmoo (2014-12-07 23:14:19+00:00)
Title: Added Gradient and Image (e.g. Pattern) support for strokes.

I added full stroke support for Images and Gradients (for stroke and strokeRect; strokeText is not yet supported).

This is 100% backward compatible and uses the original implementation for strokes that were already supported. The new code is executed only if a newly supported strokeStyle is set on the context.

This change does require the newly added ClipperLib library, which is released under the Boost Software License, which is incredibly permissive (and I believe does not conflict with the MIT license, but if someone else would like to chime in on this, it would be greatly appreciated).

There is room in the future for performance optimizations (e.g. less copying of path data structures) but for now, solidifying against the stock ClipperLib library, I think, makes more sense.

I have attached the output of the test case I used and will add the test case soon.

![img_3074](https://cloud.githubusercontent.com/assets/975687/5333142/9b0c3b40-7e3c-11e4-8be1-0bad3a581af0.PNG)

Thanks. Any and any feedback is welcome.