lundi 28 novembre 2016

Is it possible to change the size of a bitmap data instance after it has been created?

I see that there are methods to merge, draw, and copy pixels but no matter what I try it doesn't seem to change the size of the bitmap instance. Here is what I have so far:

var initialWidth:int = 100;
var initialHeight:int = 100;
bitmapData = new BitmapData(initialWidth,initialHeight,true,0xFFFFFFFF);
rectangle = new Rectangle(0, 0, newBitmapData.width, newBitmapData.height);
bitmapData.merge(newBitmapData, rectangle, new Point(), 0, 0, 0, 0);
bitmapData.drawWithQuality(newBitmapData, null, null, null, null, false, quality);
bitmapData.drawWithQuality(LoaderInfo(event.currentTarget).loader, null, null, null, null, false, quality);
bitmapData.copyPixels(newBitmapData, newBitmapData.rect, new Point());
bitmapData.merge(newBitmapData, null, new Point(), 0, 0, 0, 0);

Aucun commentaire:

Enregistrer un commentaire