[]graphics使用matrix的异常情况

Laya.loader.load("../../res/apes/monkey2.png", Handler.create(this, function()
{
var t = Laya.loader.getRes("../../res/apes/monkey2.png");
var ape = new Sprite();
ape.graphics.drawTexture(t, 0, 0);
ape.graphics.scale(1.01, 1)
Laya.stage.addChild(ape);
ape.pos(200, 0);
}));

上面这段代码并没有得到图片缩放的效果,看到的现象是图片一直在往左移动
已邀请:

cuixueying

赞同来自:

			Laya.loader.load("monkey2.png", Handler.create(this, function():void{
var t:Texture = Laya.loader.getRes("monkey2.png");
var ape:Sprite = new Sprite();
ape.graphics.scale(2, 1)
ape.graphics.drawTexture(t, 0, 0);
Laya.stage.addChild(ape);
ape.pos(200, 0);
}));
改变下scale和drawTexture的位置就好了,所有数据的设置均需要放到绘制之前!

要回复问题请先

商务合作
商务合作