Feature Request: cc.Graphics Fill Rule

I’ve been recently doing some work trying to integrate svgs with CC and it seems that in order to have better support for svg rendering, it’s necessary to implement fill rules (https://www.sitepoint.com/understanding-svg-fill-rule-property/). I’ve been looking over the engine source code, but I couldn’t find anything related to this.

My suggestion is to add both explicit and implicit fill rules.

Implicit would mean either add an optional argument to cc.Graphics#fill method or adding a property cc.Graphics#fillRule.

Explicit would mean that cc.Graphics#fill would be able to determine clockwise-counterclockwise paths and render them accordingly.

Since the focus of CC seems to have shifted toward 3d, i guess supporting 2d features doesn’t have priority, but i think it’s a nice opportunity here to gain over the vector lovers crowd :smiley: