cocos中的简易绘图

auto pDrawNode = DrawNode::create();

this->addChild(pDrawNode,2);
	
pDrawNode->drawCircle(Vec2(200, 200), 50, 1, 100, false, 1, 1, Color4F::BLUE);	//圆形
	
pDrawNode->drawTriangle(Vec2(180, 170), Vec2(240, 210), Vec2(300, 170), Color4F::GREEN);	//三角形(实心)
	pDrawNode->drawRect(Vec2(100, 100), Vec2(200, 500), Color4F::BLACK);	//矩形

pDrawNode->drawLine(Vec2(300, 300), Vec2(300, 800), Color4F::GREEN);		//线

pDrawNode->drawQuadBezier(Vec2(100, 270), Vec2(410, 500), Vec2(620, 270), 10,Color4F::BLUE);	//贝塞尔曲线

你可能感兴趣的:(cocos中的简易绘图)