Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

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

path like this, but withoud dashArray

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

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
196 views
Welcome To Ask or Share your Answers For Others

1 Answer

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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...