假如有bmp1和bmp2两个bitmapdata对象,现在要把bmp2中(sourceX,sourceY,sourceX+width,sourceY+height)区域缩放scale倍后画到bmp1的(targetX,targetY)位置,则参数设置为:
bmp1.draw(bmp2, new Matrix(scale, 0, 0, scale, targetX-sourceX*scale, targetY-sourceY*scale), null, null, new Rectangle(targetX, targetY, width*scale, height*scale), false);