W3C home > Mailing lists > Public > www-svg@w3.org > June 2004

Re: SVGTransform and SVGMatrix

From: Jonathan Watt <jonathan.watt@strath.ac.uk>
Date: Fri, 11 Jun 2004 22:11:00 +0100
Message-ID: <40CA1FE4.8060201@strath.ac.uk>
To: www-svg@w3.org

Kevin Lindsey wrote:

>>So the SVGMatrix stored by an SVGTransform should be its own private
>>copy? I.e. the SVGMatrix object passed into setMatrix() and returned by
>>the attribute matrix, are not the same SVGMatrix object as the one
>>stored by the SVGTransform object?
> That is my understanding. I don't have it handy otherwise I check, but you
> may want to look at what Batik is doing. Chances are they are using the
> correct interpretation since some of the developers are on the working
> group.

Ahh, I just uninstalled Java because I ran out of HDD space. Any chance 
anyone else happens to know what Batik does? Or any WG people listening?

>>Obviously the answer to that question makes quite a difference to the
>>outcome of the following script.
>>var matrix1   = getANewSVGMatrix();
>>var transform = getANewSVGTransform();
>>var matrix2   = transform.matrix;
>>matrix1.a += 2;
>>matrix2.b += 2;
>>If SVGTransform objects don't keep their own private SVGMatrix object
>>then the changes to matrix1 and matrix2 would affect each other and
> Right. This may be a good example of why the matrix attribute is defined the
> way it is. Since SVGMatrix maintains its own private copy, matrix1 and
> matrix2 would be independent of one another.
> Kevin

Hmm. Perhaps a name other than *set*SVGMatrix would have been less 
confusing, but it's too late now I guess.

Thanks very much for your replies Kevin! Much appreciated. :)

Received on Friday, 11 June 2004 17:11:13 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 8 March 2017 09:46:59 UTC