W3C home > Mailing lists > Public > public-webapps@w3.org > October to December 2011

Re: Proposal for a new Matrix API

From: Igor Oliveira <igor.oliveira@openbossa.org>
Date: Tue, 25 Oct 2011 14:19:08 +0200
Message-ID: <CA+Ym7xQbpRZf5VjyMLFrSihXtes8c01xoTYbhszEHStRYsGGqw@mail.gmail.com>
To: Cameron McCormack <cam@mcc.id.au>
Cc: public-webapps@w3.org

On Fri, Oct 21, 2011 at 8:04 PM, Cameron McCormack <cam@mcc.id.au> wrote:
> On 20/10/11 10:39 AM, Igor Oliveira wrote:
>> Currently CSSMatrix and SVGMatrix has an immutable API. None of the
>> method calls change the Matrix, instead, it creates a new Matrix with
>> the changed value. It can be a problem specially when CSSMatrix is
>> used together with WebGL. [1]
> SVGMatrix is not immutable.  You can modify the a, b, ..., f properties.

Yeah, i meant the rotate, multiply, inverse, translate and others methods.

> http://www.w3.org/TR/SVG/coords.html#InterfaceSVGMatrix
> However the methods that perform operations do return new matrices rather
> than modifying the one the method is called on.
>> We from WebKit are proposing a new Matrix API(simple as possible), see
>> below or [2], where the standard methods change the matrix(in place
>> operations) and additional methods (multipliedBy, scaledBy and so on)
>> create a new Matrix as is done by CSSMatrix and SVGMatrix.
>> The idea is make this class accepted where CSSMatrix and SVGMatrix is
>> used and be the preferred class for all Matrix needs. [3]
> I agree that unifying CSSMatrix/SVGMatrix is a good idea, if that is
> possible.  Will look at your specific proposal a bit later.


Received on Tuesday, 25 October 2011 12:19:45 UTC

This archive was generated by hypermail 2.3.1 : Friday, 27 October 2017 07:26:36 UTC