[]想绘制一个自适应得圆角矩形框,失败了,求解惑
var login = (function(_super){
function login(){
login.super(this);
var stageWidth = Laya.stage.width;
var stageHeight = Laya.stage.height;
console.log(stageWidth*0.05+":"+stageHeight);
var path = [
["moveTo",stageWidth*0.05,0],
["actTo",stageWidth*0.8,0,stageWidth*0.8,stageHeight*0.05,10],
["actTo",stageWidth*0.8,stageHeight*0.6,stageWidth*0.75,stageHeight*0.6,10],
["actTo",0,stageHeight*0.6,0,stageHeight*0.55,10],
["actTo",0,0,stageWidth*0.05,0,10],
];
this.graphics.drawPath(0,0,path,{fillStyle: "#ff0000"},{"strokeStyle":"#ffffff","lineWidth":"1"});
}
Laya.class(login,"login",_super);
var _proto = login.prototype;
return login;
})(Laya.Sprite);
function login(){
login.super(this);
var stageWidth = Laya.stage.width;
var stageHeight = Laya.stage.height;
console.log(stageWidth*0.05+":"+stageHeight);
var path = [
["moveTo",stageWidth*0.05,0],
["actTo",stageWidth*0.8,0,stageWidth*0.8,stageHeight*0.05,10],
["actTo",stageWidth*0.8,stageHeight*0.6,stageWidth*0.75,stageHeight*0.6,10],
["actTo",0,stageHeight*0.6,0,stageHeight*0.55,10],
["actTo",0,0,stageWidth*0.05,0,10],
];
this.graphics.drawPath(0,0,path,{fillStyle: "#ff0000"},{"strokeStyle":"#ffffff","lineWidth":"1"});
}
Laya.class(login,"login",_super);
var _proto = login.prototype;
return login;
})(Laya.Sprite);
没有找到相关结果
已邀请:
2 个回复
qwer0258
赞同来自:
Monica - 知识达人
赞同来自: