JakeSidSmith / canvasimo

An HTML5 canvas drawing library, with 150+ useful methods, jQuery-like fluent interface, and cross-browser compatibility enhancements.
http://canvasimo.com
MIT License
16 stars 2 forks source link

Allow passing colors to stroke and fill #23

Closed JakeSidSmith closed 8 years ago

JakeSidSmith commented 8 years ago

https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/stroke https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/fill

It seems that this should be possible for both, by checking if the first value is a string, and if it doesn't match nonzero or evenodd (regex check).