开发者

Drawing dashed and continuous lines

I need to draw lines; some are dashed and others are continuous. I cannot know which are dashed and which are not. When I draw the dashed lines, I use this:

CGContextSetLineDash(context, 5, linedashPattern, 2); // set dashed line

It happens, however, that if I draw 开发者_运维百科a dotted line the next ones are also all dashed. Is there an operation to reset the "Dashed" state, to draw a continuous line? For example:

CGContextSetLineContinuous(context,......); // set continuous line


CGContextSetLineDash(context, 0, NULL, 0);

B.t.w. I can only recommend to check the documentation. Definitely faster than posting a question on SO ;)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜