Re: [whatwg] Canvas Path.addPath SVGMatrix not optimal?

So can we agree on:

addPath(Path, optional SVGMatrix)

(Independent of the discussion about CanvasPathMethods.)

Does some one think it would be necessary to make SVGMatrix nullable (optional SVGMatrix?)? I think it would be superfluous.

Greetings,
Dirk

On Mar 21, 2014, at 8:02 PM, "Joe Gregorio" <jcgregorio@google.com<mailto:jcgregorio@google.com>> wrote:




On Wed, Mar 19, 2014 at 4:46 PM, Dirk Schulze <dschulze@adobe.com<mailto:dschulze@adobe.com>> wrote:
Hi,

I just looked at the definition of Path.addPath[1]:

    void addPath(Path path, SVGMatrix? transformation);

SVGMatrix is nullable but can not be omitted all together. Why isn't it optional as well? I think it should be optional, especially because creating an SVGMatrix at the moment means writing:

    var matrix = document.createElementNS('http://www.w3.org/2000/svg','svg').createSVGMatrix();

Agreed, that's painful, +1 for making it optional.

  -joe


Greetings,
Dirk

[1] http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#path

Received on Saturday, 22 March 2014 08:21:36 UTC