Advertisement

cocos2d-x 使用CCLabelTTF实现文字描边和阴影效果的方法

阅读量:

感谢点评与关注,欢迎转载与分享。

【坚持不懈,持续奋斗!

**途径一:
**

cocos2d-x 已经在类CCLabelTTF中为我们提供了相应的实现方式。


复制代码
  /** enable or disable shadow for the label */

    
     void enableShadow(const CCSize &shadowOffset, float shadowOpacity, float shadowBlur, bool mustUpdateTexture = true);
    
     
    
     /** disable shadow rendering */
    
     void disableShadow(bool mustUpdateTexture = true);
    
     
    
     /** enable or disable stroke */
    
     void enableStroke(const ccColor3B &strokeColor, float strokeSize, bool mustUpdateTexture = true);

全部评论 (0)

还没有任何评论哟~