xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From DeWeese Thomas <thomas.dewe...@gmail.com>
Subject Re: How to set rotation using an existing API
Date Thu, 01 Nov 2012 22:27:47 GMT
Hi fireball,

On Nov 1, 2012, at 11:19 AM, fireball <samiibrag@hotmail.com> wrote:

> I am using AffineTransform to rotate SVG elements but as far as I understand
> it only provides two methods to rotate. One sets it identity matrix with a
> rotation (setToRotation(theta)) and another rotates by a delta
> (rotate(theta)).
> What I want to do is set rotation to specific angle. I.e. I don't want to
> set its matrix to identity matrix nor do I want to rotate by delta.

	The first method sets it to a specific rotation, not an identity matrix so it seems that
is what you

> I want to be able to set rotation like we can by setting 'rotate' attribute. Is
> there a way to do it using AffineTransform or another API?

	setToRotation does exactly what the 'rotate' function' does in the SVG transform attribute.

	I'm a little afraid that you are trying to adjust a general affine transform (that may have
scaling and skew) so that it has a specific rotation. I'm afraid that is what you want to
do because you can't 
really do it without coming up with a perhaps non-sensical definition of rotation...

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

View raw message