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));
  • 相关阅读:
    接口和类的关系
    Java9+版本中,Interface的内容
    XSS简介
    上传漏洞(一)
    上传漏洞(二)
    初学Django
    ISCC:Please give me username and password!
    各种密码
    Debian 8.9 搭建wordpress个人博客
    网安相关书籍
  • 原文地址:https://www.cnblogs.com/luorende/p/7942231.html
Copyright © 2011-2022 走看看