How to use a cc.DrawNode or cc.drawingPrimitiveCanvas

I am trying to draw a line on my node, but I found it so hard to fulfill…

I’ve tried to copy the test layer of cc.drawingPrimitive, but the point(0,0) is on the center of my node…

you can set cc.SPRITE_DEBUG_DRAW = 1
this will draw a box around all sprites