Can please anybody explain me how will i get the x,y and rotation angle for the following image from its matrix attribute ?
<image
y="-136.18584"
x="343.87161"
id="image3000"
xlink:href="file:///C:/Users/gaurav/Documents/testing.jpg"
height="369"
width="360"
transform="matrix(0.75329963,0.65767748,-0.65767748,0.75329963,0,0)" />
I am so much weak in maths, so please help me out ?
According to Coordinate Systems, Transformations and Units – SVG 1.1 (Second Edition) and if my pocket calculator is right, it is about 41 degrees, counter clockwise.
The first value
0.75329963is the cos(theta), where theta is the sought angle. So you have only to calculate the inverse cosine for that value and have your result.x&y define the centre of the rotation. The exact values depend on what was the developers intention. In other words: where to place the image after rotating it. Their effect also depends on the image size.