898 auto s = Director::getInstance()->getWinSize();
900 auto layer = LayerColor::create(Color4B(128,128,128,255));
901 addChild(layer, -10);
904 auto label1 = Label::createWithBMFont(
"fonts/boundsTestFont.fnt",
"Testing Glyph Designer", TextHAlignment::CENTER,s.width);
906 label1->setPosition(Vec2(s.width/2, s.height/2));
908 auto drawNode = DrawNode::create();
909 auto labelSize = label1->getContentSize();
910 auto origin = Director::getInstance()->getWinSize();
912 origin.width = origin.width / 2 - (labelSize.width / 2);
913 origin.height = origin.height / 2 - (labelSize.height / 2);
917 Vec2(origin.width, origin.height),
918 Vec2(labelSize.width + origin.width, origin.height),
919 Vec2(labelSize.width + origin.width, labelSize.height + origin.height),
920 Vec2(origin.width, labelSize.height + origin.height)
922 drawNode->drawPoly(vertices, 4,
true, Color4F(1.0f, 1.0f, 1.0f, 1.0f));