var m = ele.matrix;
m.translate(10,10)
//此行更新矩陣的'e'和'f'。我也可以看到更新的值,只有當我刷新螢火蟲的值不更新元素的轉換
該元素沒有得到翻譯。請讓我知道如何讓元素服從轉換,當我改變元素的矩陣。
全碼:
<html>
<head>
<script src="raphael-min.js"></script>
<style>
#canvas_container {
width: 500px;
border: 1px solid #aaa;
}
</style>
</head>
<body><div id="canvas_container"></div></body>
<script>
window.onload = function() {
var paper = new Raphael(document.getElementById('canvas_container'), 500, 500);
text = paper.text(150,150,"Some Text");
text.transform("m1,0,0,1,5,0")
}
</script>
</html>
感謝
一些*更多*示例代碼? – 2011-12-14 13:19:43