This method calculates the distance between two points on the image.
Parameters
pt1
The Point value representing the coordinates of the first point
pt2
The Point value representing the coordinates of the second
point
unit
A value of type LengthUnit representing the
units of measurement
dpi
An integer representing the resolution of the image where the
distance is measured
Return Value
Returns a value for the distance between the two points (Type: double)
Explanation
The CalculateDistance method calculates the distance between two points on the image. The distance is calcuated and the value returned is in units defined by the unit parameter. When unit is set to LengthUnit.mm or to LengthUnit.Inch, the value set in the dpi parameter is relevant to the calculation. When unit is set to Length.None, the result will be the same as when unit is set to LengthUnit.Pixel.
When using the MouseUpImage or the annotation object's SelectedObjectDrawPoints property, it is possible to set the two points by clicking on the displayed image.
See Also
ImageKit Members | Newtone.ImageKit.Win.ImageKit