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));
原文地址:https://www.cnblogs.com/luorende/p/7942231.html