W3C home > Mailing lists > Public > whatwg@whatwg.org > August 2013

Re: [whatwg] remove resetClip from the Canvas 2D spec

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Mon, 12 Aug 2013 14:32:47 -0700
Message-ID: <CAAWBYDDf3x-X9WGBePJwGJSHMSx0Lza8tKnMyV_AY_-p3DBoCA@mail.gmail.com>
To: Justin Novosad <junov@google.com>
Cc: Simon Sarris <simon.sarris@gmail.com>, Rik Cabanier <cabanier@gmail.com>, Ian Hickson <ian@hixie.ch>, Stephen White <senorblanco@chromium.org>, WHATWG List <whatwg@whatwg.org>
On Mon, Aug 12, 2013 at 2:26 PM, Justin Novosad <junov@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".

Received on Monday, 12 August 2013 21:33:31 UTC

This archive was generated by hypermail 2.3.1 : Monday, 13 April 2015 23:09:23 UTC