cocos2dx字体描边

LabelTTF::create("fds", "", 24);

这样fontname那不填表示使用设备默认字体

std::string lvstr = FunctionUtil::getChinese("guanka");
    lvLabel = LabelTTF::create(lvstr.c_str(), "", 24);
    lvLabel->setColor(Color3B::WHITE);
    lvLabel->enableStroke(Color3B::BLACK, 1);
    //lvLabel->setTextColor(Color4B::WHITE);
    //lvLabel->enableOutline(Color4B::BLACK, 1);
    lvLabel->setAnchorPoint(Vec2::ANCHOR_BOTTOM_LEFT);
    this->addChild(lvLabel);
    lvLabel->setPosition(Vec2(2, s.height - 100))

可以用enableStroke描边,3.x的是用enableOutline描边

posted on 2014-09-17 08:41  防空洞123  阅读(548)  评论(0编辑  收藏  举报

导航