Re: How to set rotation using an existing API

fireball <[email protected]>
Newsgroups gmane.text.xml.batik.user
Message-ID <[email protected]>
Thanks Thomas for your reply. 

I am not sure what you mean by general affine transform but I have posted my
code below so maybe you can confirm that is what I am doing or not.

        Element element = document.getElementById(elementId);
        String transform = element.getAttributeNS(null,
SVGConstants.SVG_TRANSFORM_ATTRIBUTE);
        TransformListParser tlp = new TransformListParser();
        AWTTransformProducer tp = new AWTTransformProducer();
        tlp.setTransformListHandler(tp);
        tlp.parse(transform);
        AffineTransform at = tp.getAffineTransform();
        at.setToRotation(Math.toRadians(rotatationAngleInDegrees));
        element.setAttributeNS(null, SVGConstants.SVG_TRANSFORM_ATTRIBUTE,
getString(at));



--
View this message in context: http://batik.2283329.n4.nabble.com/How-to-set-rotation-using-an-existing-API-tp4655329p4655334.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.