
Код AS3:
var xSize:int = 50;//размеры битмапы, можно ими играться
var ySize:int = 50;
var s:Shape = new Shape();
s.x = xSize;
s.y = ySize;
var bmpd:BitmapData = new BitmapData(xSize, ySize, true, 0xffffffff);
var testShape:Shape = new Shape();
testShape.graphics.beginFill(0xFF0000);
testShape.graphics.drawCircle(25, 25, 15);
testShape.graphics.endFill();
bmpd.draw(testShape);
var bmp:Bitmap = new Bitmap(bmpd);
addChild(bmp);
s.graphics.beginBitmapFill(bmpd, null, true, false);
s.graphics.drawTriangles(
Vector.<Number>([0, 0, 100, 0, 0, 100, 100,100]),
Vector.<int>([0, 1, 2, 1, 3, 2]),
Vector.<Number>([0,0,1,0,0,1,1,1]));
addChild(s);