感觉画出来的线有点细,不知道设置什么属性可以修改画出来线条的粗细……
难道说是画2条么……
感觉画出来的线有点细,不知道设置什么属性可以修改画出来线条的粗细……
难道说是画2条么……
你用的是就版本的DrawPrimitives吧?DrawPrimitives中的drawLine定义:void drawLine(const Vec2& origin, const Vec2& destination),参数只有起点和终点。
如果是3.x版本的DrawNode的drawSegment方法可以带有起点、终点、线段宽度、和线段颜色的参数。定义:
void DrawNode::drawSegment(const Vec2 &from, const Vec2 &to, float radius, const Color4F &color)
例:
DrawNode::create()->drawSegment( Vec2(100, 100), Vec2(0, 0), 0.5, Color4F(0.55, 0.41, 0.25, 1));
谢谢啦 我有时间试下
正解啊