How to divide the path into several segments?

陌路散爱 提交于 2019-12-13 08:19:03

问题


I need to divide the Path into several sections. For example, a Path has a dashArray parameter that specifies the length of the dash and length of the gap. I need to get one or more paths that match only the dashes. That is, I need to get a path like this

but without dashArray attribute. How can I do this using paper.js or some other library?


回答1:


I found the solution to my problem. PaperJS have a method Path.getPointAt(offset) Here offset - is ofsset in pixels from start of path. I maked simple sketch



来源:https://stackoverflow.com/questions/48268210/how-to-divide-the-path-into-several-segments

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!