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

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

71. 如何实现渐变填充对象呀? [ 77%]

...如何绘制一个渐变矩形? this.graphics.drawRect(0, 0, 500, 350, "#ffffff") drawRect(x:Number, y:Number, width:Number, height:Number, fillColor:*, lineColor:* = null, lineWidth:Number = 1):void 参数fillColor:* — 填充颜色,或者填充绘图的渐变对象 我找不到关于这个渐...

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

72. 多行输入文本组件 · LayaAir3.3 · 引擎文档 · LAYABOX [ 77%]

...//字体 this.txtarea.fontSize = 50; //字体大小 this.txtarea.color = "#ff0000"; //字体颜色 this.txtarea.bold = true; //加粗 this.txtarea.italic = true; //斜体 this.txtarea.underline = true; //下划线 this.txtarea.underlineColor = "#ff0000"; //下划线颜色 this.txtarea.stroke = 5; //...

来源: Laya3.0_文档 发布时间: 20251010

73. 关于event中只读属性touches,问题,求解 [ 77%]

... = "#232628"; var txt:Text = new Text(); txt.text = "hello"; txt.color = "#FF00FF"; txt.width = 100; txt.height = 100; txt.x = 200; txt.y = 100; txt.fontSize = 50; txt.on("click", this, onFunc); Laya.stage.addChild(txt); } private function onFunc(e:Event):void { var arr:Array = e.touches; console.lo...

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

74. 一行居中的动态文字,怎么设置不同样式。 [ 76%]

...t;<span style='color:red'>提示:</span><span style='color:#FFF'>我是随时可更改的动态文本</span></p>类似这种效果。 2017-04-13 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 1 ...

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

75. 绘制矩形与圆角矩形(JavaScript-LayaAir基础篇(JS)-矢量图) [ 76%]

... //画矩形         sp.graphics.drawRect(20, 20, 100, 50, "#ffff00");                } })(); ``` 代码运行效果: ​ ![图片](img/2.png) ​ (图2) 示例中的“20,20”是矩形起始点坐标,100是向右的宽度,如果是负数则是向左的宽度...

来源: Laya2.0_文档 发布时间: 20210715

76. 单选框组件 · LayaAir3.3 · 引擎文档 · LAYABOX [ 76%]

...roke = 3; //文本标签字体描边宽度 this.radio.labelStrokeColor = "#ffffff"; //描边颜色 this.radio.strokeColors = "#000000, #c6ff00, #001aff"; //各状态下的描边颜色 this.radio.labelColors = "#0100ff, #16fa0e, #ff0000"; //各状态下的文本颜色 // this.radio.selected = true; /...

来源: Laya3.0_文档 发布时间: 20251010

77. 如何用Tween 给graphics.drawLine 设置缓动 [ 76%]

...stage.addChild(sp); endX=0; endY=0; sp.graphics.drawLine(10,10,endX,endY,'#FF0000'); Laya.timer.frameLoop(1,this,onFrameLoop); } private function onFrameLoop():void { endX+=2; endY+=2; sp.graphics.drawLine(10,10,endX,endY,'#FF0000'); } } } 2017-04-18 0 0 分享 微博 QZONE 微信 为什么被折叠...

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

78. Panel中添加图片无法显示,文本可以 [ 76%]

....ui.Label();     label.text = "fsadfsdfsdfsdfsdf";     label.color = "#ff0000";     label.fontSize = 40;     label.y = 50;     var label2 = new laya.ui.Label();     label2.text = "fsadfsdfsdfsdfsdf";     label2.color = "#0000ff";     label2.fontSize = 40;     label2.y = 100;     ...

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

79. 裁切图片后,该用什么方式去重绘出裁切后的图片 [ 76%]

...ppppppppppppp ", points)         ctx.drawPoly(0, 0, points, "#FFFFFF", "#FF00FF", 1)     } 附件 : --> 2020-04-28 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 0 个回复 为什么被折叠? 0 个回复...

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

80. hitArea用法问题 [ 76%]

...n.x-10,this.closeBtn.y-10,this.closeBtn.width+20,this.closeBtn.height+20,"#FF0000"); let hitA:Laya.HitArea = new Laya.HitArea(); hitA.hit = g; this.closeBtn.hitArea = hitA; // 写法二 this.closeBtn.graphics.drawRect(this.closeBtn.x-10,this.closeBtn.y-10,this.closeBtn.width+20,this.closeBtn.height+...

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