- From: Tab Atkins Jr. <jackalmage@gmail.com>
- Date: Mon, 12 Aug 2013 14:32:47 -0700
- 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 well. 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". ~TJ
Received on Monday, 12 August 2013 21:33:31 UTC