title: Drawing a line segment using cocos2djs
body: <p>I want to draw a line segment using cocos2d-js. Suppose I have two points</p>
  
  <pre><code>cc.p(50,50);
  </code></pre>
  
  <p>and </p>
  
  <pre><code>cc.p(200,200);
  </code></pre>
  
  <p>, how do I connect these two points using a line?</p>
  
  <p>I've looked around and  </p>
  
  <pre><code>cc.DrawNode();
  </code></pre>
  
  <p>is not having a drawLine() method though it has a drawDot() method. So I thought I should go for </p>
  
  <pre><code>cc.DrawingPrimitiveCanvas(renderContext);
  </code></pre>
  
  <p>but I can't seem to get it working. I am only starting to learn cocos2d-js. It would be very helpful if you can show me how to draw a simple line, be it using DrawNode() or DrawingPrimitiveCanvas().</p>