问题
I wish to interactively move handles or points in a path with the mouse. I think I can manage to program a scan in all points and handles and compute the one at mouse position. But is there a more simple way to select them?
回答1:
You can use getNearestPoint(cursorPoint)
method which can be invoked from Path
item
Link to the documentation with an example: http://paperjs.org/reference/path/#getnearestpoint-point
来源:https://stackoverflow.com/questions/31227091/in-paper-js-is-there-a-simple-way-to-select-the-closest-point-relative-to-mous