W3C home > Mailing lists > Public > www-svg@w3.org > March 2012

SVGMatrix on not supported transform function (was Re: review comments for SVG-related parts of css3-transforms)

From: Dirk Schulze <dschulze@adobe.com>
Date: Fri, 16 Mar 2012 09:42:42 -0700
To: Cameron McCormack <cam@mcc.id.au>
CC: SVG public list <www-svg@w3.org>
Message-ID: <4051592C-0A60-4591-898D-B889B4261513@adobe.com>

On Mar 13, 2012, at 11:01 PM, Dirk Schulze wrote:

>>   It might still be possible to get the ‘SVGMatrix’ by the attribute
>>   ‘matrix’.
>> We should define exactly in which circumstances it is not possible to,
>> and what the attribute should return in those cases.
> You are right. We can differ between two types
> 1) Not supported 2D transformation functions (translateX, translateY, scaleX, scaleY)
>   We could easily return a SVGMatrix here. Returning translate or scale as function type would not be correct in my eyes, since it could conflict with the CSSOM objects that will (hopefully) added to CSS4 Transforms (http://www.w3.org/TR/css3-3d-transforms/#csstransformvalue-interface link will not be reachable soon). For these transformation functions we should return UNKNOWN as type.
> 2) 3D Transformation functions
>   Not only that we don't support 3D Transformation functions in SVG DOM, they might also not be transformable to 3x2 matrices. But there are still excuses like rotateZ, translate3d where the third argument is zero and so on. The easiest way would be not to support them at all. Otherwise it needs to get specified what to do for every function.
> One problem after reading the SVG spec again: SVG does not specify how SVGMatrix should look like for UNKNOWN transformation functions, correct? Should all values be zero? Should it be the identity matrix?
> I'd like to let this part unspecified and recommend that future versions of the SVG spec should specify it.
I replaced the wording by

If a two-dimensional transform function is not supported, the attribute ‘matrix’ must return a 3x2 ‘SVGMatrix’ with the corresponding values as described in the section Mathematical Description of Transformation Functions.

Received on Friday, 16 March 2012 16:43:29 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 8 March 2017 09:47:27 UTC