FindPerpendicularLine Method
Syntax
CWIMAQVision.FindPerpendicularLine Line, Point, PerpendicularLine
Return Type
On success, this method returns 0. On failure, this method returns a negative number.
Purpose
Computes a perpendicular line that passes through a point and is perpendicular to a reference line.
Remarks
If Point lies on Line, the first point of PerpendicularLine is not the same as Point. The second point of PerpendicularLine is Point, and the first point lies on the line perpendicular to Line.
Parameters
Line As CWIMAQLine
Defines the reference line.
Point As CWIMAQPoint
Defines the point.
PerpendicularLine As CWIMAQLine
On return, the line that passes through the given point and is perpendicular to the reference line. The first point is Point. The second point lies on Line.
Example
Dim line As New CWIMAQLine Dim point As New CWIMAQPoint Dim perpendicular As New CWIMAQLine ' Initialize the line and the point line.Initialize 10, 10, 100, 100 point.Initialize 50, -50 ' Find the line that passes through point and ' is perpendicular to line CWIMAQVision1.FindPerpendicularLine line, point, perpendicular