Bugzilla – Bug 19932
Proposal: Add CanvasRenderingContext2D.fillRule
Last modified: 2013-01-03 23:38:14 UTC
I could not find any response or actions to the:
While working on pdf.js and shumway projects I noticed that even-odd fill rule is used by default in PDF and Flash formats. Also, it's available in "... other languages/libraries ... (in alphabetical order): cairo, Direct2D, GDI, PDF, PostScript, Quartz, skia, and SVG".
The implementation/support/simulation this functionality without canvas fillRule only using available 2D context functions will not look pretty or intuitive, e.g. something like:
ctx.rect(10, 10, 100, 40);
ctx.rect(15, 15, 90, 30);
ctx.fillRule = 'evenodd';
will look much better than its replacement.
Is it expected to have something like fillRule in the spec?
There seems to have been a response on this topic by Ian Hickson:
I've taken note of the suggestions below in the source of the HTML5 spec,
but not added them to the language yet. As we approach last call for the
HTML5 spec, I am trying to reduce the number of new features added, so
that we can stabilise the document and feature set and give implementors a
fixed set of features to aim for.
* Colours set by component
* The equivalent of SVG's fill-rule
* Line styles -- dashed and dotted lines
Checked in as WHATWG revision r7635.
Check-in comment: Introduce canvas 2d context's fillRule attribute