跳到主要内容

Path.projectPoint()

The Path.projectPoint() function calculates and returns the point on this path that is closest to the given point. If mul提示le points have the same distance, which of these nearest points is chosen is not defined.

注意

The line between the given point and the returned point will always be either perpendicular to the path or go to a corner or an endpoint.

Signature

Point Path.projectPoint(
Point p,
)

Example

A Path.projectPoint() example