Shortest distance from a boundary of this shape to the given point. Points within closed shapes return a distance less than zero.
Assembly: Cognex.Vision.Core.Net (in Cognex.Vision.Core.Net.dll) Version: 9.21.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
IShape 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 PointMarker, only its center is considered meaningful, not the distance to one of the arms.
See Also