@cuixueying 感谢你上面做的回答
现在遇到以下的问题
public function drawImage(target:Sprite,srcbmd:Image, mx:Matrix, p1:Point, p2:Point, p3:Point, p4:Point):void
{
var texture:Texture = Laya.loader.getRes(srcbmd.skin);
target.graphics.drawTexture(texture,0,0);
var path:Array = ;
path.push(p2.x, p2.y);
path.push(p3.x, p3.y);
path.push(p4.x, p4.y);
path.push(p1.x, p1.y);
target.graphics.drawPoly(p1.x, p1.y,path,"#FF7F50");
_mask.graphics.drawTexture(texture,0,0);
var path1:Array = ;
path1.push(p2.x, p2.y);
path1.push(p3.x, p3.y);
path1.push(p4.x, p4.y);
path1.push(p1.x, p1.y);
_mask.graphics.drawPoly(p1.x, p1.y,path1,"#FF7F50");
}
会报错
main.max.js:1595 Uncaught TypeError: Cannot read property 'sourceWidth' of undefined
还有 _mx.createGradientBox 和 graphics.beginGradientFill 实在不知道用啥方法来替换了。哎
具体的可以看源码