Re: Read/Write transform values

fireball <[email protected]>
Newsgroups gmane.text.xml.batik.user
Message-ID <[email protected]>
Thanks! Jonathan.

This makes things much cleaner and easier to deal with.

The only thing is rotation. It does not sound straight forward like the
other values (translate, shear, scale).

Is there a simple way to set/get rotate value? 
I tried something like this for setting it but it did not work:

String strTransform = elt.getAttributeNS(null,
SVGConstants.SVG_TRANSFORM_ATTRIBUTE);
TransformListParser p = new TransformListParser();
AWTTransformProducer tp = new AWTTransformProducer();
p.setTransformListHandler(tp);
p.parse(strTransform);
AffineTransform at = tp.getAffineTransform();  
at.rotate(Math.toRadians(Double.valueOf(rotateAngle)));


For getting it I had to parse the transform string myself to get rotate
value.

Note that my transform is like this: transform="matrix(a,b,c,d,e,f)
rotate(angle)". Should rotate be part of the matrix?

Any thoughts?



--
View this message in context: http://batik.2283329.n4.nabble.com/Read-Write-transform-values-tp4655190p4655199.html
Sent from the Batik - Users mailing list archive at Nabble.com.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.