blob: 7b67b49b46122c97eadca099ff3c45cd9cfc034a [file] [log] [blame]
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
<svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" onload="runTest()">
<title>Test of the SVGPoint object and .matrixTransform() method</title>
<script type="text/ecmascript">
<![CDATA[
function runTest() {
var svgPoint = document.rootElement.createSVGPoint();
var ctm = document.getElementById("test").getScreenCTM();
svgPoint.x = 30;
svgPoint.y = 30;
svgPoint = svgPoint.matrixTransform(ctm.inverse());
if (svgPoint.x == 15 && svgPoint.y == 15) {
document.getElementById("test").textContent = "Passed";
}
}
]]>
</script>
<text transform="scale(2)" x="20" y="20" id="test">Failed</text>
</svg>