On Sep 25, 2013, at 2:46 PM, Simon Pieters <simonp@opera.com> wrote: > On Mon, 23 Sep 2013 21:30:06 +0200, Tab Atkins Jr. <jackalmage@gmail.com> > wrote: > >> On Mon, Sep 23, 2013 at 11:28 AM, Simon Fraser <smfr@me.com> wrote: >>> Why do we need both DOMPoint and DOMPointLiteral? >> >> DOMPointLiteral exists so that you can call methods that expect points >> without having to wrap it in a verbose DOMPoint() constructor at >> call-time. >> >> That is, you can say "el.transformPoint({x:5, y:10})" instead of >> "el.transformPoint(new DOMPoint(5, 10))". > > transformPoint, is that convertPointFromNode or something else? No, it transforms the passed point by the matrix. var m = DOMMatrix(); m.scale(3); var newPoint = m.transformPoint(oldPoint); will scale the point by the factor 3. I will change the argument type to a DOMPointLiteral. Greetings, Dirk > > -- > Simon Pieters > Opera SoftwareReceived on Wednesday, 25 September 2013 14:45:50 UTC
This archive was generated by hypermail 2.4.0 : Monday, 23 January 2023 02:14:32 UTC