可能重复:
How to get the actual x/y position of an element in SVG with transformations and matrices我们如何从转换矩阵得到x和y?
我需要的是在SVG这样写的一个元素的X/Y位置:
<image
y="-421.28461"
x="335.27295"
id="image2991"
xlink:href="file:///C:/Users/tom/Documents/t.jpg"
height="369"
width="360"
transform="matrix(0.22297057,0.97482518,-0.97482518,0.22297057,0,0)" />
这里x
& y
属性给出,但这不给图像的实际位置。虽然我知道在
变换矩阵[a,b,c,d,e,f]
e
& f
分别给出了在x和y平移轴线。但
问题是,这里两个(e & f)
都是0.现在我可以得到这个图像的实际x
任何y
?
它写满了。 'x =“335.27295”'''y =“ - 421.28461”' – Shai 2012-07-18 06:49:23
但这不是元素 – 2012-07-18 06:50:30
的实际x和y请参见[image element](http://www.w3.org/TR/SVG/struct .html#ImageElementXAttribute)来自SVG文档 – Shai 2012-07-18 06:51:13