[whatwg] remove resetClip from the Canvas 2D spec

Tab Atkins Jr. jackalmage at gmail.com
Mon Aug 12 14:32:47 PDT 2013

On Mon, Aug 12, 2013 at 2:26 PM, Justin Novosad <junov at google.com> wrote:
> Ok, so here is a simple proposal:
> IDL:
> enum CanvasSaveMode { "all", "transform", "clip", "transform-and-clip" };
> save(optional CanvasSaveMode mode);
> Modes:
> all: save the entire rendering context state
> transform: save only the current transform
> clip: save only the current clip
> if mode is not specified, the entire context state is saved (for backward
> compatibility)

This isn't very extensible.  You're missing some options, and if we
ever want to add more, we have to add more combination options as

Better is to define a dictionary with keys of "transform" and "clip"
(+more?), whose values are bools.  Like you say, not passing the
dictionary is taken to mean "save everything".


More information about the whatwg mailing list