点击打开链接
new
cc.DrawNode() 创建draw对象,画点,线段,多边形
var
drawNode =
new
cc.DrawNode();
this
.addChild(drawNode);
drawNode.clear()
drawNode.ctor()
drawNode.drawCardinalSpline(config, tension, segments, lineWidth, color)
drawNode.drawCatmullRom(points, segments, lineWidth, color)
drawNode.drawCircle(center, radius, angle, segments, drawLineToCenter, lineWidth, color)
drawNode.drawCubicBezier(origin, control1, control2, destination, segments, lineWidth, color)
drawNode.drawQuadBezier(origin, control, destination, segments, lineWidth, color)
drawNode.drawDot(pos, radius, color)
drawNode.drawDots(points, radius, color)
drawNode.drawPoly(verts, fillColor, lineWidth, color)
drawNode.drawRect(origin, destination, fillColor, lineWidth, lineColor)
drawNode.drawSegment(from, to, lineWidth, color)