- From: Dirk Schulze <dschulze@adobe.com>
- Date: Tue, 24 Mar 2015 21:36:17 +0000
- To: Simon Pieters <simonp@opera.com>
- CC: "public-fx@w3.org" <public-fx@w3.org>
> On Mar 24, 2015, at 10:27 PM, Simon Pieters <simonp@opera.com> wrote: > > Most interfaces in the Geometry spec have a dictionary type so you can use a direct JS object as an argument instead of requiring the object to implement the relevant interface. DOMMatrix doesn't have a dictionary though. It seems to me that it should. > > Since DOMMatrix has both a-f and m11-m44 attributes, the dictionary will have to support members for all those as well and accept objects where all are set. > > It probably makes sense to have a dictionary member for is2D, to preserve it being false even though the members indicate a 2d matrix. The constructor could throw TypeError if it was set to true but the other members indicate a 3d matrix. > > I don't see any reason to have a dictionary member for isIdentity. > > The a-f members and the corresponding mXX members can't have default values in the IDL, but can be defaulted in prose in the algorithm. If e.g. a and m11 are set to different values we could throw TypeError. > > dictionary DOMMatrixInit { > unrestricted double a; // 1 > unrestricted double b; // 0 > unrestricted double c; // 0 > unrestricted double d; // 1 > unrestricted double e; // 0 > unrestricted double f; // 0 > unrestricted double m11; // 1 > unrestricted double m12; // 0 > unrestricted double m13 = 0; > unrestricted double m14 = 0; > unrestricted double m21; // 0 > unrestricted double m22; // 1 > unrestricted double m23 = 0; > unrestricted double m24 = 0; > unrestricted double m31 = 0; > unrestricted double m32 = 0; > unrestricted double m33 = 1; > unrestricted double m34 = 0; > unrestricted double m41; // 0 > unrestricted double m42; // 0 > unrestricted double m43 = 0; > unrestricted double m44 = 1; > boolean is2D; > }; > > Does this seem reasonable? We didn’t want to add more things than there were requests for initially. I think this is the only reason why we didn’t add it in the first place. Greetings, Dirk > -- > Simon Pieters > Opera Software >
Received on Tuesday, 24 March 2015 21:40:05 UTC