大约有 796 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0052 秒)
... //继续画到D点 ["closePath"] //闭合路径 ]; //绘制梯形 lineSpr.graphics.drawPath(0, 0, path, {fillStyle: color}, {"strokeStyle": color, "lineWidth": "1"}); 初始得出梯形的上顶边宽度是:0.001523 像素 这时候梯形高度是1186 像素 但是 画的不完整。感...
来源: Laya_社区 发布时间: 20180717
...webgl,直接使用canvas功能,实现了部分渐变功能。 spbg.graphics.drawPath(0,0, radius(spbg.width,spbg.height,10),{ fillStyle: gradient}); 请问怎么写代码能调用下面的canvas原生代码?不用Laya的滤镜。 (Laya滤镜和webgl捆绑了) ...
来源: Laya_社区 发布时间: 20180615
...内部,设置renderType为mask 步骤三:绘制遮罩图形(使用graphics组件为sprite绘制遮罩形状,双击sprite进入到sprite内部,并从组件面板中拖拽一个graphics组件放置到sprite内部) 步骤四:双击舞台,回到image最外层,F12发布,显示如...
来源: Laya_社区 发布时间: 20160927
...unction () { var content=this._content; var rect = new Laya.Sprite(); rect.graphics.drawRect(0, 0, this.contentWidth, this.contentHeight, "#000000"); content.hitArea = new Laya.HitArea(); content.hitArea.hit = rect.graphics; } 然后分别在panel的“setContentSize”和“changeScroll”方法的...
来源: Laya_社区 发布时间: 20170610
...ut.width; sharedCanvas.height = layout.height; //先清空绘制 // layout.graphics.clear(false); //设置大小 var canvas = new Laya.Texture(sharedCanvas); canvas.bitmap.alwaysChange = true;//小游戏使用,非常费,每帧刷新 sp.graphics.drawTexture(canvas); layout.addChild(sp); } /** ...
来源: Laya_社区 发布时间: 20190328
...题 let miniMap = new Laya.Sprite(); miniMap.autoSize = true; miniMap.graphics.drawRect(0,0,100,100, '#000000'); let mapMask = new Laya.Sprite(); mapMask.autoSize = true; mapMask.graphics.drawRect(0,0,miniMap.width,miniMap.height, '#ff0000'); miniMap.mask = mapMask; Laya.stage.addChild(miniMap) 2...
来源: Laya_社区 发布时间: 20181101
...is, function () { var t = Laya.loader.getRes(url) var sp = new Sprite() sp.graphics.drawTexture(t, 0, 0, 80, 80) that.addChild(sp) var cMask = new Sprite() cMask.graphics.drawCircle(40, 40, 37, "#ff0000") sp.mask = cMask //sp.addChild(cMask) //sp.removeChild(cMask) sp.pos(7,14) console.log(cMask.x...
来源: Laya_社区 发布时间: 20180710
...ush(["lineTo" , x , gridHeightPx]); } paths.push(["closePath"]); gridShape.graphics.drawPath(0 , 0 , paths , {fillStyle:"#0000ff"});能麻烦帮忙看下什么问题么 附件 : --> 2017-09-01 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关...
来源: Laya_社区 发布时间: 20170901
...dex])continue ; texture=this.sources[index]; if (isHorizontal)this.graphics.drawTexture(texture,dX+i *(texture.sourceWidth+this.spaceX),0,texture.sourceWidth,texture.sourceHeight); else this.graphics.drawTexture(texture,0+dX,i *(texture.sourceHeight+this.spaceY),texture.sourceWidth,textu...
来源: Laya_社区 发布时间: 20180228
... y+=this._charSize.height; this._graphics.drawLine(x,y,x+lineWidth,y,this.underlineColor || this.color,1); } y 如果 y+=this._charSize.height/2; 就是中划线 可以自己加个变量 控制 例如 linethrough 如果是 true...
来源: Laya_社区 发布时间: 20171019