[whatwg] Proposal: Add CanvasRenderingContext2D.fillRule with "nonzero" (default) and "evenodd" options

Tab Atkins Jr. jackalmage at gmail.com
Wed Jan 9 11:59:01 PST 2013


On Wed, Jan 9, 2013 at 11:42 AM, Rik Cabanier <cabanier at gmail.com> wrote:
> Do people have an opinion on a boolean value vs an enum?
> A boolean value is slightly faster to execute and type while an enum is
> more descriptive.
>
> So far, canvas has not used enum values before.

I strongly prefer enums for cases where it's not a simple yes/no, and
this clearly qualifies.

(I also prefer enums generally even when this is true, but that's my
CSS experience talking, where we have a history of changing things
that were once booleans into multi-state when people ask for more
features later.)

~TJ



More information about the whatwg mailing list