[whatwg] Proposal: Add CanvasRenderingContext2D.fillRule with "nonzero" (default) and "evenodd" options
Boris Zbarsky
bzbarsky at MIT.EDU
Wed Jan 9 17:19:51 PST 2013
On 1/9/13 6:56 PM, James Ascroft-Leigh wrote:
> How can the presence of the winding rule parameter of the fill() and clip()
> operations be detected by client code?
This is a case where .length including optional arguments would have
been useful. :(
That said, you can detect this via hacks like this, I expect:
var ruleArgSupported = false;
try {
ctx.fill({ defaultValue: function() { ruleArgSupported = true;
return false; } });
} catch (e) {
// Really shouldn't happen, but who knows
}
-Boris
More information about the whatwg
mailing list