[whatwg] Canvas: dash list API
ian at hixie.ch
Sat Dec 22 10:04:12 PST 2012
On Sat, 22 Dec 2012, Anne van Kesteren wrote:
> Is there not some way we can have a lineDash attribute that returns a
> manipulatable object that inherits from Array rather than the current
> Java-like API? I remember this was discussed when getLineDash() and
> setLineDash() were added, but I think it's worth taking another look at
> (For URLs I want something similar for path segments and I'd rather not
> introduce get/set methods.)
What would you want to have happen in the case of a library method that
saves the context, sets the dash to an internal value, draws a line, saves
the dash state to an internal value, restores the context, then returns?
Should the caller, if they then grab the dashed line object from the
context, get the internal value of the library? Should the restore() call
mutate the saved dash object?
Ian Hickson U+1047E )\._.,--....,'``. fL
http://ln.hixie.ch/ U+263A /, _.. \ _\ ;`._ ,.
Things that are impossible just take longer. `._.-(,_..'--(,_..'`-.;.'
More information about the whatwg