xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fireball <samiib...@hotmail.com>
Subject Re: How to set rotation using an existing API
Date Fri, 02 Nov 2012 13:49:20 GMT
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.

---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org


Mime
View raw message