package
{
import laya.display.Sprite;
import laya.maths.Matrix;
import laya.net.Loader;
import laya.resource.Texture;
import laya.utils.Handler;
public class LayaAirDemo
{
public function LayaAirDemo()
{
Laya.init(700,600);
Laya.loader.load('res/apes/monkey2.png',Handler.create(this,onLoaded))
}
private function onLoaded():void
{
var texture:Texture=Loader.getRes('res/apes/monkey2.png');
var sp:Sprite=new Sprite();
var matrix:Matrix=new Matrix();
matrix.rotate(Math.PI/4);
matrix.translate(150,100);
sp.graphics.drawTexture(texture,0,0,texture.width,texture.height,matrix);
sp.graphics.drawRect(100,50,200,90,'#000000');
Laya.stage.addChild(sp);
}
}
}