private function onClick():void
{
var htmlCanvas:HTMLCanvas=img.drawToCanvas(100,100,0,0) as HTMLCanvas;
var texture:Texture=new Texture(htmlCanvas);
var sp:Sprite=new Sprite();
sp.graphics.drawTexture(texture,0,0,100,100);
Laya.stage.addChild(sp);
sp.x=200;
}
}
}
1 个回复
cuixueying
赞同来自: