• 首页
  • 动态
  • 案例
  • 引擎社区
  • API
  • 文档
  • 示例
  • 引擎下载

大约有 796 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0052 秒)

171. 绘制梯形 出错问题~ [ 72%]

... //继续画到D点 ["closePath"] //闭合路径 ]; //绘制梯形 lineSpr.graphics.drawPath(0, 0, path, {fillStyle: color}, {"strokeStyle": color, "lineWidth": "1"});   初始得出梯形的上顶边宽度是:0.001523 像素   这时候梯形高度是1186 像素  但是 画的不完整。感...

来源: Laya_社区 发布时间: 20180717

172. 请问,怎么写代码能直接调用canvas 内的发光滤镜? [ 72%]

...webgl,直接使用canvas功能,实现了部分渐变功能。   spbg.graphics.drawPath(0,0, radius(spbg.width,spbg.height,10),{ fillStyle: gradient});  请问怎么写代码能调用下面的canvas原生代码?不用Laya的滤镜。 (Laya滤镜和webgl捆绑了)             ...

来源: Laya_社区 发布时间: 20180615

173. LayaAirIDE下如何使用mask? [ 72%]

...内部,设置renderType为mask   步骤三:绘制遮罩图形(使用graphics组件为sprite绘制遮罩形状,双击sprite进入到sprite内部,并从组件面板中拖拽一个graphics组件放置到sprite内部) 步骤四:双击舞台,回到image最外层,F12发布,显示如...

来源: Laya_社区 发布时间: 20160927

174. Panel控件滑动区域不正常的问题 [ 72%]

...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

175. sharedCanvas现在在laya里面不能用了吗???急 在线等 [ 72%]

...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

176. Sprite生成的mask对Sprite作用时显示不正确 [ 72%]

...题   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

177. 小游戏导入手机后Sprite.Mask没有正常显示 [ 71%]

...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

178. drawPath的绘制问题 [ 71%]

...ush(["lineTo" , x , gridHeightPx]); } paths.push(["closePath"]); gridShape.graphics.drawPath(0 , 0 , paths , {fillStyle:"#0000ff"});能麻烦帮忙看下什么问题么 附件 : --> 2017-09-01 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关...

来源: Laya_社区 发布时间: 20170901

179. FontClip问题 [ 71%]

...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

180. Text的中划线(删除线) [ 71%]

...         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