[LayaAir 1.0]在一个矩形之上画另一个矩形,只显示一个矩形

var WebGL = laya.webgl.WebGL;
Laya.init(480, 800, WebGL);

//串盒子的宽
var boxWidth = 440;
//串盒子的高
var boxHeight = 500;
//串盒子
this.chuanBox = new Laya.Rectangle(Laya.stage.width - boxWidth >> 1, Laya.stage.height - boxHeight - 10, boxWidth, boxHeight);
//画出盒子
Laya.stage.graphics.drawRect(
this.chuanBox.x, this.chuanBox.y, this.chuanBox.width, this.chuanBox.height,
"#FFFFEE", "#FFFFFF", 2);

this.sageBox = new Laya.Rectangle(this.chuanBox.x+this.chuanBox.width/2,this.chuanBox.y+this.chuanBox.height-100,
this.chuanBox.width/2,100);
//世嘉SAGE区
Laya.stage.graphics.drawRect(
this.sageBox.x, this.sageBox.y, this.sageBox.width, this.sageBox.height,
null, "#FFFFFF", 2);
已邀请:

Michael

赞同来自:

打印输出该矩形看一下,可以把这个不显示的矩形下x, y坐标输出看一下。

要回复问题请先

商务合作
商务合作