绘制虚线和实线
我需要画线;有些是虚线,有些是连续的。我不知道哪些是虚线,哪些不是。当我绘制虚线时,我使用这个:
CGContextSetLineDash(context, 5, linedashPattern, 2); // set dashed line
但是,如果我绘制虚线,接下来的线也都是虚线。是否有重置“虚线”状态以绘制连续线的操作? 例如:
CGContextSetLineContinuous(context,......); // set continuous line
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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
顺便说一句,我只能建议检查文档。绝对比在 SO 上发布问题更快;)
B.t.w. I can only recommend to check the documentation. Definitely faster than posting a question on SO ;)