Shortest distance from this shape to the given point.
Namespace: Cognex.VisionProAssembly: Cognex.VisionPro.Core (in Cognex.VisionPro.Core.dll) Version: 75.1.0.0
Syntax
Parameters
- x
- Type: System Double
The x-coordinate to measure from.
- y
- Type: System Double
The y-coordinate to measure from.
Return Value
Type: DoubleThe distance from the point (x, y) to the shape.
Implements
ICogShape DistanceToPoint(Double, Double)Remarks
Returns the shortest distance from this shape to the given point in the shape's selected coordinate space. Points within closed shapes return a distance less than zero.
The distance is measured to a meaningful part of the shape. For example, in measuring the distance to a CogPointMarker, only its center is considered meaningful, not the distance to one of the arms.
See Also