- From: <pegan@gresham-forms.co.uk>
- Date: Thu, 23 Dec 2004 12:49:14 -0000
- To: chris@w3.org
- Cc: www-svg@w3.org
- Message-ID: <ABBC3C36BDCC5644961FDFADDD58C5680CDC7C@server_exch.ntserv.greshamticket.co.uk>
Hi Chris, Thanks for the link. I have convinced myself that transforms are applied in the 'provided order' (left to right?). I have also just convinced myself that Batik and ASV6 are applying transforms left to right (also in the provided order ?). In the case of say :- <?xml version="1.0" encoding="UTF-8"?> <svg width="100%" height="100%" xmlns="http://www.w3.org/2000/svg"> <rect width="30" height="30" fill="orange" transform="translate(200,0) rotate(45)"/> </svg> The translate is performed first (origin moves to 200,0) then the rotation of the rectangle at the new origin, thus order is left to right according to the spec and processed by Batik and ASV as per spec. In the graphics primer you say 'the transform which is applied first appears closest to the vector'. Is the transform that is closest to the vector(s) the first (ie. leftmost) or the last (ie.rightmost) in the transform list ? At the moment I just don't get the right to left bit. Kind Regards, Patrick -----Original Message----- From: Chris Lilley [mailto:chris@w3.org] Sent: 23 December 2004 10:43 To: pegan@gresham-forms.co.uk Cc: www-svg@w3.org Subject: Re: SVG 1.1 Spec Rec - 7.6 The Transform Attribute On Thursday, December 16, 2004, 6:16:48 PM, pegan wrote: pgfcu> Hi SVG WG, pgfcu> pgfcu> According to 1.1 spec :- pgfcu> "The value of the transform attribute is a pgfcu> <transform-list>, which is defined as a list of transform pgfcu> definitions, which are applied in the order provided". pgfcu> pgfcu> The transform definitions seem to be applied in the pgfcu> reverse order to the provided order (ie. right to left) in ASV6 pgfcu> and Batik. Yes, they are. To understand why that is correct, you need to look into matrix math a little, in particular to understand the terms premultiply and postmultiply. I suggest having a look at a computer graphics primer on geometry, (just the first chapter), which I wrote a while ago: http://www.ii.uib.no/undervisning/kurs/v01/i291/i291/geom_sn.pdf -- Chris Lilley mailto:chris@w3.org Chair, W3C SVG Working Group Member, W3C Technical Architecture Group Important - This e-mail and the information that it contains may be confidential, legally privileged and protected by law. Access by the intended recipient only is authorised. Any liability (in negligence or otherwise) arising from any third party acting, or refraining from acting, on any information contained in this e-mail is hereby excluded. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Copyright in this e-mail and attachments created by us belongs to STR Gresham Business Forms Ltd the author also asserts the right to be identified as such and object to any misuse.
Received on Thursday, 23 December 2004 12:50:02 UTC