運用Matrix的identity()方法,可以將Matrix重設回初始設定值,也就是沒有變形功能的Matrix
程式碼:
var m:Matrix=new Matrix();
trace(m.toString());
m.scale(0.5,0.5);
trace(m.toString());
m.identity();
trace(m.toString());
結果:
(a=1, b=0, c=0, d=1, tx=0, ty=0)
(a=0.5, b=0, c=0, d=0.5, tx=0, ty=0)
(a=1, b=0, c=0, d=1, tx=0, ty=0)
沒有留言:
張貼留言