Draw Node shape Confusion

Draw Node shape Confusion
0.0 0


if i want to create 2 shapes without using any sprite.Does i need two draw node object?

DrawNode * dn=DrawNode::create();
dn->drawSolidRect(cocos2d::Vec2::ZERO, Vec2(_visibleSize.width/4,_visibleSize.height/4),    Color4F::BLUE);
dn->drawSolidRect(cocos2d::Vec2::ZERO, Vec2(_visibleSize.width/2,_visibleSize.height/8), Color4F::RED);

Here, i have created two shapes with one object how can set diff. pos for both.


You can either create two separate drawnodes and modify each drawnode’s position or redraw rectangles in one drawnode as you need with new positions.