zoukankan      html  css  js  c++  java
  • cocos2d-x JS 纯代码渲染Lable描边

    /**
    * Enables shadow style and sets color, offset and blur radius styles.
    * @param {cc.Color} shadowColor
    * @param {cc.Size} offset
    * @param {Number} blurRadius
    */
    enableShadow: function(shadowColor, offset, blurRadius){
    this._labelRenderer.enableShadow(shadowColor, offset, blurRadius);
    },

    /**
    * Enables outline style and sets outline's color and size.
    * @param {cc.Color} outlineColor
    * @param {cc.Size} outlineSize
    */
    enableOutline: function(outlineColor, outlineSize){
    this._labelRenderer.enableStroke(outlineColor, outlineSize);
    },



    // result.setFontName(lb.FONT);
    var result = this.getComponentByName("Result");

    // result.enableOutline(cc.color(59,40,112),3);//描边颜色,描边宽度
    // result.enableShadow(cc.color(239,74,74),cc.size(0,-5),0);//第一个参数为阴影颜色,第二个参数为阴影相对于标签的坐标,第三个参数设置透明度
    // result.enableOutline(cc.color(239,74,74),cc.size(0,5));
  • 相关阅读:
    Node 基本配置
    python GIL锁
    大数据 Zookeeper 集群
    大数据 Hadoop HA
    python 内置方法使用
    Linux Curl使用
    Linux 文件解压缩
    大数据 Hadoop 常见端口
    大数据 Hadoop 集群安装
    css结构设计思想
  • 原文地址:https://www.cnblogs.com/luorende/p/7942231.html
Copyright © 2011-2022 走看看