egret-docs
egret-docs copied to clipboard
native 0.1.20 使用Graphics导致崩溃
native 0.1.20 ,Shape对象,使用Graphics绘制一个矩形。运行后,点击这个矩形。崩溃。
let rect = new egret.Shape(); rect.width = this.stage.stageWidth; rect.height = this.stage.stageHeight; rect.touchEnabled = true; let g = rect.graphics; g.beginFill(0x0000ff); g.drawRect(0, 0, this.stage.stageWidth, this.stage.stageHeight); g.endFill(); this.addChild(rect);