Actionscript 3 多目标矩阵变换尺度

Actionscript 3 多目标矩阵变换尺度,actionscript-3,matrix,scale,Actionscript 3,Matrix,Scale,我有一组瓷砖,它们是在我的画布上画的 我知道如何将画布从中心变换为比例: var m:Matrix = new Matrix(); m.translate(-centerX, -centerY); m.scale(scaleX, scaleY); m.translate(centerX, centerY); 这将缩放平铺并将其转换为x,y var m:Matrix = new Matrix(); m.translate(_tile.x,_tile.y); m.scale(_scale, _sc

我有一组瓷砖,它们是在我的画布上画的

我知道如何将画布从中心变换为比例:

var m:Matrix = new Matrix();
m.translate(-centerX, -centerY);
m.scale(scaleX, scaleY);
m.translate(centerX, centerY);
这将缩放平铺并将其转换为x,y

var m:Matrix = new Matrix();
m.translate(_tile.x,_tile.y);
m.scale(_scale, _scale);

但是,当我在画布上绘制位图分幅时,如何从中心缩放所有位图分幅

此代码显示如何缩放和居中分幅bitmapdata分幅_1是使用bitmapdata.draw方法排列的0,0位图:

var tile:BitmapData = new tile_1();
var canvas:BitmapData = new BitmapData(1000, 1000, true, 0x00FFFFFF);
var scale:Number = 2;
canvas.draw(tile, new Matrix(scale, 0, 0, scale, -tile.width*scale/2, -tile.height*scale/2));

如果您使用其他绘制平铺的技术,请更详细地描述它

谢谢你的回复。我的问题有点不同。我有100x100个瓷砖阵列,我用draw将它们放在画布上。在绘制瓷砖时,我使用转换来滚动瓷砖。我想学习如何根据它们在画布上的位置从中心缩放所有瓷砖。你说的根据它们在画布上的位置从中心缩放所有瓷砖是什么意思?我的代码缩放平铺并绘制它,您也可以将给定点的平移添加到绘图矩阵中,否则我无法回答您的问题。