flash on 2011-2-8
...
@author narutohyper
/**
* Copyright narutohyper ( http://wonderfl.net/user/narutohyper )
* MIT License ( http://www.opensource.org/licenses/mit-license.php )
* Downloaded from: http://wonderfl.net/c/51Te
*/
package
{
import flash.display.Bitmap;
import flash.display.BitmapData;
import flash.display.Shape;
import flash.display.Sprite;
/**
* ...
* @author narutohyper
*/
public class ShapeTest extends Sprite
{
public function ShapeTest()
{
var bmd:BitmapData = new BitmapData(200, 200, false, 0xFF0000)
var sp:Shape = new Shape()
sp.graphics.beginFill(0x0000FF)
sp.graphics.drawCircle(50, 50, 50);
sp.scaleX = 2
sp.scaleY = 2
addChild(sp);
bmd.draw(sp)
var bm:Bitmap = new Bitmap(bmd)
addChild(bm)
bm.y=200
}
}
}