Hi Fireball, Well this does set your element to the specified rotation just like you had change the transform attribute to "rotate(rotationAngleInDegrees)", doesn't it? What did you want it to do? Just add an additional rotation? In that case you want to either preMultiply or postMultiply 'at' by a new AffineTransform with your rotation (which is appropriate depends on where you want to rotate).
You also mentioned describing what you wanted in terms of adding a rotate element to the text transform. So simply doing that textually is always an option. Thomas On Nov 2, 2012, at 9:49 AM, fireball <samiib...@hotmail.com> wrote: > 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-unsubscr...@xmlgraphics.apache.org > For additional commands, e-mail: batik-users-h...@xmlgraphics.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: batik-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: batik-users-h...@xmlgraphics.apache.org