DrawLineWithArrows Method
Syntax
CWMachineVision.DrawLineWithArrows Overlay, Line, StartHasArrow, EndHasArrow [, Color]
Return Type
On success, this method returns 0. On failure, this function returns a negative number.
Purpose
Draws a line segment with arrows at either the start point, the end point, or both.
Remarks
This function is used by many of the CWMachineVision methods to draw their results, and is exposed as a convenience method.
Parameters
Overlay As CWIMAQOverlay
The overlay onto which to draw the line segment.
Line As CWIMAQLine
The line to draw.
StartHasArrow As Boolean
If true, an arrow is drawn at the line's starting point.
EndHasArrow As Boolean
If true, an arrow is drawn at the line's ending point.
Color As Variant
[Optional] The color of the overlay. If not supplied, the DefaultColor property of the CWIMAQOverlay object is used.
Example
'Get the selected line from the viewer Dim Line As New CWIMAQLine CWMachineVision1.GetSelectedLineFromViewer CWIMAQViewer1, Line 'Draw a line with one arrow at the line's ending point CWMachineVision1.DrawLineWithArrows CWIMAQViewer1.Image.Overlays(1), Line, False, True